Skip to content

Conversation

@klown
Copy link

@klown klown commented Aug 13, 2020

Draft pull request/work-in-progress

Writing tests is a way to familiarize myself with the code, XCode, and the testing framework. Still, the tests herein revealed two bugs that I've fixed:

  • Missing encoding of email in User.swift
  • Fixes to the remove() function in Preferences.swift

More tests to come.

JIRA: https://morphic.atlassian.net/browse/MOR-103

klown added 21 commits July 20, 2020 14:54
- Added tests for a new Preferences instance
- Added tests for non-existent preference
- Improved test for keyValueTuples

Note: test for remove(key:) still fails
- PreferencesTests: Since keys implement Equatable, used '=='
to compare them.

- StorageTests: Used guard-with-constant insted of if to check
for nil.
- fixed Storage tests to handle asynchronous saving and loading,
- added minimal test for loading default preferences as created
by the application
- modifed Storage load() tests due to change in load() signature
- added test for contains() when it returns false
@christopher-rtf christopher-rtf linked an issue Aug 13, 2020 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MorphicCore Unit Tests

2 participants