Understand UI component testing.
- [Narrator] Since we're aiming to be…good software engineers, we're going to decouple the…data source and delegate for the UI TableView…into a separate class.…In our MovieLibraryViewController test, make some room,…on line 34, func testViewDidLoad_SetsTableViewDataSource().…We're going to put two assertions in here, the first one:…XCTAssertNotNil(sut.movieTableView.dataSource),…want to make sure that this actually has dataSource.…
The second one is going to be…XCTAssertTrue(sut.movieTableView.dataSource…is MovieLibraryDataService).…This is going to fail because MovieLibraryDataService…doesn't exist yet.…Save this and let's write the implementation.…In FilmFest, in your Controllers file,…create a new file,…make sure that Cocoa Touch Class is selected,…and that NSObject is the Subclass.…
We're going to name it MovieLibraryDataService.…Next, Create, and Save that.…To make this actually work, we need an outlet…in our ViewController.…We're going to be doing this through Storyboard,…so we're going to manually create an IBOutlet variable,…
- Test-driven development: history and theory
- Creating a data model test
- Expanding tests
- Testing class methods
- Checking for duplicates
- Testing table views
- Mocking cells
- Testing cell selection
- Assembling the app
Skill Level Intermediate
Distributing Your iOS App for Testing with TestFlightwith Ron Buencamino35m 10s Intermediate
1. Foundation and Theory
2. Data Models and the Manager Class
3. UITableView Testing
4. Finishing Touches and Xcode Features
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
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.