What was wrong? • 0 structure • Connected domain • API Requests from Activities and Fragments • Business Logic everywhere • Network operations updating data repositories • Data repositories in memory • Tons of duplicated code.
Testability Quick review • Mixing object graph construction with application logic • Ask for things, don’t look for things • Doing work in constructor • Global State/Singletons • Static methods
• Black-box oriented tests • End to end • Instrument deployed app in phone/simulator • No tests doubles can be used • Needs a full and provisionable server environment • Slow tests Acceptance Tests Concepts
• Outside of the emulator (JVM) • No need external env set up • Tests run in build time • App context • Use test doubles • Slower tests than unit tests Integration Tests Concepts