Efficiently configuring a cell with the proper data is an essential task. In this video, walk through testing that our mock cell configures with the correct data in the correct cell labels.
- [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 caught up yet,…so let's just replace TableViewMock with TableViewMock,…
- 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?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
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.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.