When a cell from section one of our TableView is selected, we want the favoriting functionality to be triggerd. In this video, see how to test that our data service and our movie manager are working together correctly to give us the desired action.
- [Instructor] Alright, so our movie cell is almost done.…We've tested that we can dequeue and configure cells…for both the table view sections.…But, we haven't yet tested how data is being mapped…to the cell's title label or subtitle label.…And actually selecting cells from the table view…doesn't actually do anything right now.…So, for simplicity, we're going to be using…the default table view cell configuration…of having a title and a subtitle.…But you could easily test a custom cell…by connecting up the outlets and the storyboard…like we did with the data service and delegate object.…
Now, in the test folder, we're going to add a new group…and we're going to call this Test Views.…Inside here let's make a new unit test case class.…And we're going to call this MovieCellTests.…Next, make sure that it's in the right folder, and Create.…Now let's add our @testable line…and delete our default code at the bottom of the file.…Now, you might be wondering why we're creating…a separate test class for our cell…when we've already done a fair bit of that already…
- 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
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?
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.