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

Configure the TableView cell

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

Start my 1-month free trial

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…

Contents