This is an example of Android application using TDD and MVP design pattern to show the current weather information. It is written 100% in Kotlin with both Espresso and Unit tests.
This demo explains below concepts such as:
- TDD architecture
- MVP design pattern
- Koin dependency injection
- Kotlin code architecture
- ReactiveX for Async operations
- Clean code concept
Features:
Neat build.gradle with shared dependencies.
Koin Android. Injectable Views and structure to make the app testable and maintanable.
State management with RxKotlin and Android Components - background-foreground and orientation changes will connect to the ongoing network request.
Network requests continue in the background - UI is capable of retrieval of the current state when resumed.
Custom retrofit call factory to handle no connection error in a reactive way.
Espresso tests with overriden dependencies and MockWebServer.
Easy debuggable builds.