Join Chiu-Ki Chan for an in-depth discussion in this video Testing with MVP: ArgumentCaptor, part of Effective Android Testing for Mobile Developers.
- [Instructor] Finally, we will test…loading a actual recipe.…Create a new test method called Load Water and Favorite.…Again, we will use the @Test annotation.…Then, public void, load water and favorite.…What we are going to here is to load water.TXT…out of the resources folder here.…This is the same as what we did when we wrote recipe test.…
So, let's go back to that file.…Press Command O and search recipeTest.…Scroll up to look for the water function,…copy lines 12 and 13.…Then, we can press Command E to go look at the recent files…to switch back to RecipePresenterTest.java.…Here, inside the Load Water and Favorite function,…in line 41, paste in what we copied.…
What we are doing here is that we try to…load the recipe out of the file.…For consistency, I will replace the word RecipeTest…with RecipePresenterTest so that we stay…within the same class.…Now that we have a recipe, we can return it whenever…store.getrecipe gets called.…We can copy that from the function Recipe Not Found.…Copy line 32,…and paste it after line 45.…
- 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.