This demo application is based on the Clean Architecture principles and the Model-View-Presenter (MVP) architectural pattern.
The application uses the following libraries:
- Dagger2 for dependency injection
- RxJava to use Reactive Extensions
- Gradle Retrolambda Plugin to allow using Java 8 lambda expressions on Java 7
- Map Struct to map between object models
- Butter Knife for view binding
- Retrofit for REST communication
- Picasso for image downloading
The application includes both local unit tests and instrumented tests.
- Local unit tests verifies presenters and domain objects (use cases), in both cases testing pure java code (nothing related with Android SDK).
- Instrumented tests modifies the injection graph to generate a mock API returning stub data and using different network behaviours. It test the whole application including all layers.
In order to run the instrumented tests, follow these steps (as described on Espresso setup instructions):
- On your device, under Settings->Developer options disable the following 3 settings:
- Window animation scale
- Transition animation scale
- Animator duration scale