From the course: iOS App Development: Test-Driven Development

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Check off movies

Check off movies

From the course: iOS App Development: Test-Driven Development

Start my 1-month free trial

Check off movies

- [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…

Contents