Skip to content

NewsSuite is sample News App which uses Dagger2-MVP Architecture

Notifications You must be signed in to change notification settings

faheemkalsekar/NewsSuite

Repository files navigation

News Suite

This is a sample app that uses MVP Architecture with Dagger 2.

Introduction

Functionality

The app is composed of 1 main screen.

NewsListFragment

Allows you to fetch News Items from a URL. Each News Item fecthed is kept in the database in News table.

Building

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.

Testing

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.

Build Variants

There are 3 build variants.

  1. mockDebug : Displays list items from a Fake Respository. Shows 2 items in the list
  2. prodDebug : Fetches from a remote server.
  3. prodRelease : Fetches from a remote server.

UI Tests

The projects uses Espresso for UI testing.

Libraries

Dagger 2 for dependency injection

Retrofit for REST api communication

Picasso for image loading

espresso for UI tests

mockito for mocking in tests

Releases

No releases published

Packages

No packages published