Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOR-103: Add unit tests for core code #51

Draft
wants to merge 26 commits into
base: master
Choose a base branch
from

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
1 participant