Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EC / MVP books list displayer #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

efrencampillo
Copy link

MVP implementation of the challenge

The current implementation is done with the provided techStack and also added the next libraries:

  • swiperefresh layout
  • recyclerview
  • Gson for retrofit parsing
  • mockito for testing purposes

Approach:
As per requested MVP is used as pattern for the client solution. For network layer a data provider was created using RX to execute network requests, and in order to solve the lifecycle integration of the singleton data provider, live data is being used to subscribe to the network results in the ui.

The presenter is initialized along with the view, this way if the view is destroyed, the presenter is destroyed as well, so no memory leak issues when the Presenter interface is implemented by the UI.

Unit Test

unit test was provided for the presenter logic, using only JDK not Android environment, this are the faster test that do not require an emulator running.

Android test

Android tests were not requested but it is possible to inject mocks of the DataProvider and verify the ui is presented properly on the screen with Espresso.

Videos

loadInfo pull error rotation
infoload.webm pull_refresh.webm api_error.webm screen_rotate.webm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant