Understand how to clear our MovieManager class data.
- [Instructor] Our Movie Manager needs…some added functionality, so let's write a test…for resetting our movie array content.…If we go to our Movie Manager test class,…make some space, online 76.…Write func test clear…all array items should return…array counts of zero.…Once we have our test,…we're going to add two movies to our system.…
They can be the same or different.…It's up to you now that we're equatable.…We are safe in that regard.…We're going to close out our double parentheses.…We're going to favorite the first item…at index zero, and we're going to add some assertions.…XC test assert,…XC test assert equal,…that are movies to see count is equal to one,…and that our movies seen count is also equal to one.…
Now this would pass right now.…What we actually want to test…is if we can clear both of our arrays…from our Movie Manager,…so we're going to call SUT clear arrays.…Now this is going to give us the error we want…and the failing test.…We have no member clear arrays on our Movie Manager class,…so let's go ahead and add that here…
- 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?
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.