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.
Test cell selection
From the course: iOS App Development: Test-Driven Development
Test cell selection
- [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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Interface testing setup5m 33s
-
(Locked)
Data source and delegate setup8m 1s
-
(Locked)
TableView section one tests8m 41s
-
(Locked)
TableView section two tests4m 10s
-
(Locked)
Mocking the TableView cell10m 22s
-
(Locked)
Configure the TableView cell12m 35s
-
(Locked)
Test cell selection11m 35s
-
(Locked)
-
-