You are previewing Test-Driven iOS Development.

Test-Driven iOS Development

Cover of Test-Driven iOS Development by Graham Lee Published by Addison-Wesley Professional
O'Reilly logo

9. View Controllers

The BrowseOverflow app now has a very stable base, because all the model and “business logic” code has been grown using tests. Many people attempting to adopt app-wide unit testing practices of any form—including TDD—get despondent when moving “higher up” in the app toward the controller and view layers. How can code that is supposed to interact with a user be subjected to automated testing? That is exactly what you’ll find out in this chapter as we build up the view controllers and associated objects.

Class Organization

Each of the views shown and described in Chapter 5, “Test-Driven Development of an iOS App,” is basically the same: There’s a table, whether it’s a table of topic names, of question titles or the question ...

The best content for your career. Discover unlimited learning on demand for around $1/day.