In order to test your interface, we need to make sure you have a a link between our View Controller and its Test Class. In this video, learn how to set up our MovieLibraryViewController file, assign it in the storyboard, and create our accompanying test c
- [Instructor] Let's start off our view controller test…by making ourselves a brand new test class.…In our test folder, under Test Controllers,…I'm going to right-click, and add a new file.…And we want this to be a unit test case class.…We're going to call this library view controller tests.…Now we need our testable import,…so let's add that at the top,…and delete our two default functions.…Now a good habit to get into when testing view controllers,…is to start by checking…that the components we're going to need are not nil.…
So the first test we're going to write here…is to check that we have a table view…on our library view controller.…I'm going to make myself some room,…and on line 24, I'm going to write a new pragma mark,…for this section called Nil Checks.…Let's also start off our first function.…Func, test library V-C,…underscore,…table view should not be nil.…Now as we learned in our last section,…the best way to go about organizing a new test class,…is to declare a system under test variable…at the top of the file,…
- 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.