Join Chiu-Ki Chan for an in-depth discussion in this video Refactor: Show recipe, part of Effective Android Testing for Mobile Developers.
- [Instructor] In step four, when the recipe is not null,…we will show the recipe.…We do that by setting the title text,…the title selector state, and also the text…for the description.…But remember, the activity does not…know about the recipe any more…so we need to go through the presenter.…Open RecipePresenter.…In Line 21, we are handling the case…when the recipe is null.…Add an else block in line 23 to handle the case…when the recipe is not null.…
What do we do here?…When the recipe is not null, we would like to…update the title view and the description view.…And those things are Android things,…meaning that we cannot do it directly inside the presenter.…We will need to go through the view.…View, dot, Set Title, and then we will use recipe dot title.…Right now, the view interface does not have set title yet.…So move your cursor over there and press Alt Enter…to create it.…
Go back to the presenter.…We will do the same for the description.…View dot setDescription, and then recipe dot description.…Once again, move your cursor to the red part,…
- Why test?
- Local vs. on-device
- Code coverage
- UI testing
- Hermetic environment
- Dependency injection
- Testing with MVP
Skill Level Intermediate
Android App Development: Unit Testingwith James P White2h 58m Intermediate
Android App Development: Data Persistence Librarieswith Annyce Davis4h 52m 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.