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.
Assemble the app
From the course: iOS App Development: Test-Driven Development
Assemble the app
- [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…
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.