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.
Configure the TableView cell
From the course: iOS App Development: Test-Driven Development
Configure the TableView cell
- [Instructor] As we've seen, mocks can be extremely helpful when testing implementation. Now that we've tested our TableView Property Dequeue's, we're going to use another mock to check that our cells are configured with the data we want. Namely, the movie's title and release date if it has one. Now before we dive into that, let's do a little reorganization with our mocks. In our Test folder, let's Right-click, Create a New Group. And we're going to call this Mocks. And with that New Folder selected, let's Create a New Swift File, and name it MockExtensions. Now in here we need to import UIKit, and we need a testable import line. So @testable import FilmFest. Now I'm going to go back to my Data Service Tests, Copy the Entire Extension, Delete it from our Data Test File, and Paste it into our MockExtensions. Now let's Save this and Rerun all our Data Tests, and make sure that everything is still working properly. Now our tests are fine. We're getting an error because Xcode hasn't…
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)
-
-