https://github.com/danielcarlosce/mywallet
Example of applying Sandi Metz's unit test approach into an iOS app
https://github.com/danielcarlosce/mywallet
Last synced: over 1 year ago
JSON representation
Example of applying Sandi Metz's unit test approach into an iOS app
- Host: GitHub
- URL: https://github.com/danielcarlosce/mywallet
- Owner: danielCarlosCE
- License: mit
- Created: 2017-07-20T22:31:27.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-25T16:40:36.000Z (about 9 years ago)
- Last Synced: 2025-01-26T20:09:21.285Z (over 1 year ago)
- Language: Swift
- Homepage:
- Size: 128 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MyWallet
This is an iOS app with 100% test coverage! The goal is not to discuss how much we should cover, but to show how we test different scenarios. With few exceptions, the tests are based on Sandi Metz's great talk: [The Magic Tricks of Testing](https://www.youtube.com/watch?v=URSWYvyc42M)
# UI

## Incoming Query: Assert Result
[testEqualsDoesConsiderBalanceStatus](https://github.com/danielCarlosCE/MyWallet/blob/master/MyWalletTests/WalletViewModelTests.swift#L20)
### Incoming Command: Assert direct public side effects
[testLoadViewDoesSetOutlets](https://github.com/danielCarlosCE/MyWallet/blob/master/MyWalletTests/ViewController2Tests.swift#L14)
### Outgoing Command: Expect to send
[testAddExpenseWithPositiveValueDoesAddNegativeValue](https://github.com/danielCarlosCE/MyWallet/blob/master/MyWalletTests/ViewModelTests.swift#L31)
### Dependency Injection
[ViewModel(storage: testStorage)](https://github.com/danielCarlosCE/MyWallet/blob/master/MyWalletTests/ViewModelTests.swift#L11)
### Mock/Stub
[TestDelegate](https://github.com/danielCarlosCE/MyWallet/blob/master/MyWalletTests/ViewModelTests.swift#L75)