- Lets refactor recipe activity into Model View Presenter…One thing that is confusing about the Model View Presenter…is that the view here is not the same as the view in Android…Instead, it is a generic term for the UI…In Android, this usually corresponds to an activity,…or a fragment.…For our app, it is recipe activity.…Now that we know what is our view,…we need to find a view interface,…which does not contain any Android classes.…
We will create an interface called…Recipe Contract for that.…This contract is going to be in the same folder…as the recepie activity.…Scroll on your project view, and locate recepie activity…under Main Java UI recepie.…Right click, new, Java Class…We will call it recipe contract.…Change it from class to interface.…Press OK.…
Inside the recipe contract, we will have two interfaces:…View, and listener…The view contract allows the presenter to talk to the view…and the listener allows the view to talk to the presenter.…How do we decide what goes into these interfaces?…The presenter should contain the logic.…
- Why test?
- Local vs. on-device
- Code coverage
- UI testing
- Hermetic environment
- Dependency injection
- Testing with MVP
Skill Level Intermediate
1. Testing Considerations
2. Test as You Go
3. UI Testing
4. Hermetic Environment
5. Robot Pattern
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.