Nothing is better than seeing an application run for the first time in the simulator or on a real device. In this video, see how to add placeholder data to our TableView and test the full functionality of the application.
- [Instructor] All our hard work is about to pay off,…but before we run the app in the simulator again,…let's add some section titles to our TableView…and a bit of dummy data to our library ViewController.…Now since we don't have any data persistence,…the app will reset every time you run it,…and that's perfectly fine.…This is just a minimum viable product.…All we're doing is trying to test the basic functionality.…So while we're still in our library data service test,…let's start a new func…testTableViewSectionTitles_ShouldHaveCorrectStringValues.…
Now we need to pull out our section1Title…and we can do that by referencing our…LibraryTableView.dataSource.tableView…and we can access the delegate method for…titleForHeaderInSection.…Now for the TableView we want to reference,…it's our libraryTableView…and titleForHeaderInSection, zero.…We can't forget to force unwrap our TableView…that we've just used.…Let's do the exact same thing for section2Title.…
So we're going to have this equal to a…libraryTableView.datasource.tableView…
Author
Released
3/14/2018- 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
Duration
Views
Related Courses
-
Introduction
-
Welcome1m 4s
-
-
1. Foundation and Theory
-
Why test-driven development?2m 26s
-
Unit tests explained1m 46s
-
Development techniques1m 33s
-
Planning and design1m 12s
-
2. Getting Started
-
Project setup2m 32s
-
Test case breakdown2m 53s
-
Create a data model5m 5s
-
Expand the data model4m 8s
-
3. The Manager Class
-
Create the movie manager5m 39s
-
Add manager functionality5m 24s
-
Check off movies10m 27s
-
Compare movies6m 14s
-
Wrap up the movie manager4m 37s
-
-
4. TableView Testing
-
Interface testing setup5m 33s
-
TableView section one tests8m 41s
-
TableView section two tests4m 10s
-
Mocking the TableView cell10m 22s
-
Configure the TableView cell12m 35s
-
Test cell selection11m 35s
-
-
5. Finishing Touches
-
Assemble the app6m 16s
-
Code coverage2m 54s
-
-
Conclusion
-
Next steps47s
-
- 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.
CancelTake 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.
Share this video
Embed this video
Video: Assemble the app