- [Instructor] Effective testing should allow us…to pinpoint to the exact place…where we have a problem.…The best way to do that is to make each test…as specific as possible.…To do that, we will build our app…from the smallest unit first.…In this app it is the recipe.…Let's create a new class called recipe.…We will put it under the data model package.…Right click on this long package name under Java,…click new, Java class.…
We will call it recipe…and change the package to data.model.…Click okay.…Each recipe has three public final string fields,…ID, title, and description.…To create another public final string field…we will use the duplicate command, Command + D,…and change the variable name description.…And our studio is not happy…because these final fields are not initialized.…
We will generate a constructor to do that.…Press Alt + Enter, add construction parameters,…select all three parameters,…change the constructor to be private…because we are going to make…a static factory method to parse the recipe…and create it.…
- 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.