Since we want to keep our data source and delegate code separate from our View Controller, we will need to create a separate object to hold them. In this video, walk through how to create a Data Service class, add an empty object in the storyboard, and co
- [Instructor] Alright, for the rest of this section we're…going to focus on testing our table view.…Since we're aiming to be good software developers,…we're going to decouple the data source…and delegate into a separate class.…But first let's make ourself a new pragma mark…underneath the nil checks and name this one Data Source.…Let's also start a new test function…and we're going to call this…testDataSource_viewDidLoad_SetsTableViewDataSource.…
Inside the test, we're going to assert that our…data source is not nil and that it's of type…MovieLibraryDataService, which is going to be…our decoupled class.…So let's say XCTAssertNotNil, and we're going to…use our sut library table view data source.…And we're also going to say XCTAssertTrue,…that sub.librarytableview.datasource…is of type MovieLibraryDataService.…And we're going to get our first error here…because our data service class doesn't exist yet.…
So let's go into our film fest folder, right click,…and select New Group.…Go ahead and name this Data Service.…
- 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
Advanced iOS Development: Working with APIswith Saul Mora1h 59m Intermediate
Designing iOS and Android Appswith Renata Phillippi1h 6m 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.