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 explained it 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 now and put the setup code directly in setUp(). Firstly, add the property var sut: InputViewController!. Secondly, add the View Controller 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", bundle: nil) ...

Get Test-Driven iOS Development with Swift now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.