tdd
How to TDD (Test-Driven-Development) a model that is related to data persistence?
Assume that I have a boolean that indicates whether the app is launched for the very first time or not (so I can show some guides for the first time) I encapsulated that boolean into a model class (may be called AppContext) class AppContext { var isFirstLaunch: Bool var otherAppScopeVar: Int // ... } Can I test this kind of things?
you shouldn't! you should only test your application behavior in those two scenarios. you need to execute your application after injecting that data with its two different states in order to test both scenarios.
Related Links
How do you do TDD in a non-trivial application?
TDD Spider Solitaire
How to deal with those TDD breaking people? [closed]
How to create a mock object based on an interface and set a read-only property?
Exercises to enforce good practices such as TDD and Mocking
What are some reasons why a sole developer should use TDD?
Database integration tests
Pseudocode Programming Process vs. Test Driven Development
Can TDD Work in a Architect/Implementer Environment? [closed]
Adversarial/Naive Pairing with TDD: How effective is it?
Single most important thing to impart when teaching TDD [closed]
What happened to NUnit?
Developers are dissatisfied with TDD. Is TDD really the problem, or is it a lack of skill of novice practicitioners?
Application Testing
How to shift your paradigm to test-driven development
How do I tell MSTEST to run all test projects in a Solution?