This is a sample app that uses MVP Architecture with Dagger 2.
The app is composed of 1 main screen.
Allows you to fetch News Items from a URL. Each News Item fecthed is kept in the database in News table.
You can open the project in Android studio and press run. Selecting mockDebug will show 2 items fecthed from a mock db. Selecting prodDebug will fetch from a remote server.
There are 2 testing cases. newsDetails_DisplayedInUi & emptyNewsDetails_DisplayedInUi. newsDetails_DisplayedInUi tests for list items displayed correctly. emptyNewsDetails_DisplayedInUi checks if error string is displayed. Currently both the test cases are failing, cause of strange java.lang.NoSuchMethodError: error is Test file. Would require some more time to debug this issue.
There are 3 build variants.
- mockDebug : Displays list items from a Fake Respository. Shows 2 items in the list
- prodDebug : Fetches from a remote server.
- prodRelease : Fetches from a remote server.
The projects uses Espresso for UI testing.