Implementing InputViewController

Add a test case with the name InputViewControllerTests, import the ToDo module, and remove the two template methods. If you have problems with this task, go back to the beginning of the previous sections, where we covered this in more detail.

You have taken a look at the first steps of the TDD of controllers several times now. Therefore, we will perform several steps at once and put the setup code directly in setUp(). Firstly, add the property var sut: InputViewController!. Secondly, add the view controller class InputViewController. Again, if you are unsure about how to do this, have a look at the previous sections. Next, add the following setup code to setUp():

let storyboard = UIStoryboard(name: "Main", ...

Get Test-Driven iOS Development with Swift 4 - Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.