Join Chiu-Ki Chan for an in-depth discussion in this video Incoming intents: Unknown theme, part of Advanced Android Espresso Testing.
- [Instructor] What happens if we launched Ideas Activity…with a theme that it doesn't know.…Let's try that.…Copy and paste the test message Punny.…Rename it to Unknown.…On line 44, instead of loading the string from resource…we are going to hot code the value Silly.…We will create the intent and pass it to launch activity…the same way so you can keep lines 46 through 48.…
However, we are not expecting the theme Silly…to be displayed in the text view theme because…it is not a known theme.…Let's go back to the activity and see what it does.…Press command shift-T to jump back to Ideas Activity.…Scroll to the place where we are handling the theme.…On line 39, if you click on it…so that it is not in-lining the string,…you can see the code.…
We are parting the string a known theme…and passing it a theme.…Come on click on a known theme…and you can see that it has a place holder,…percent one dollar S.…That is why we need to pass in the theme so that…we can do something with it in the place holder.…Press command E and select Ideas Activity to go back.…
- Incoming and outgoing intents
- How intents are used
- Dependency injection
- Why extract dependencies?
- Mockito and Dagger
Skill Level Advanced
Android App Development: Data Persistence Librarieswith Annyce Davis4h 52m Intermediate
Effective Android Testing for Mobile Developerswith Chiu-Ki Chan2h 56m Intermediate
2. Hermetic Test Environment
- 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.