Our application's main feature is being able to "favorite" a movie that you've already seen, and have that reflected in the interface. In this video, review how to test that functionality.
- [Instructor] Later in the app, when we tap a movie…in our table view, that movie is going to be checked off…and moved from the movies to see list to the movies seen.…Now even without our table view set up yet,…we're going to start working on that functionality now.…While we're still in the manager class test,…let's add a new pragma mark for a new section.…We're going to call this Checking Off.…I'm going to make myself some room here,…so we can see what we're doing.…And start a new test function.…Func testCheckOffMovie underscore…UpdatesMovieManagerCounts.…
Inside the test we need to do a few things.…However, it's worth noting that even though…our tests are getting more complicated,…we're still doing the best we can to keep each one…focused on a single action or event.…So here let's add a movie to our library,…sut.addMovie,…and I'm just going to put this all in one line…with a title, going to call this Action/Adventure.…After this, I'm going to simulate checking off a movie,…so sut checkOffMovieAtIndex.…
And I'm going to pass in zero.…
- What is test-driven development?
- Creating and expanding a data model
- Creating a manager class
- Testing class methods
- Checking for duplicates
- Testing table views
- Mocking cells
- Testing cell selection
- Assembling the app
Skill Level Intermediate
Advanced iOS Development: Working with APIswith Saul Mora1h 59m Intermediate
Designing iOS and Android Appswith Renata Phillippi1h 6m Intermediate
1. Foundation and Theory
2. Getting Started
3. The Manager Class
4. TableView Testing
5. Finishing Touches
- 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.