O'Reilly logo

Test-Driven iOS Development with Swift 3 by Dr. Dominik Hauser

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 I 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 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", bundle: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required