Brief Overview
- Kotlin
Android Model-View-ViewModel (MVVM) design architecture was used with the Repository pattern. This is to prevent tight-coupling of components (allowing for proper separation of concerns) thereby favoring testability, easier code maintenance and extensibility as the code base grows.
The project package was structured by Feature
. This is to aid readability,
code navigation & modularity.
Dagger 2
- For Dependency InjectionRetrofit & RxJava
- For Making Network requestGlide
- For Image LoadingMockito
- For mocking dependencies duringunit test
This app was built with testability in mind.
-
The
ViewModel
,Repository
andDataHelper
classes used in this task were unit tested withMockito
. Dependencies have been injected where possible to be substituted with Mocks. -
Espresso was also used to Test the project view files
-
The kotlin Extension function used in this project was also unit-tested
- List of category data was obtained from
http://mobcategories.s3-website-eu-west-1.amazonaws.com