O'Reilly logo

iOS 8 SDK Development, 2nd Edition by Janie Clayton, Chris Adamson

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

Creating Tests

The WebViewTests class contains the same setUp, tearDown, testExample, and testPerformanceExample methods we saw in the other class. We can delete the latter two methods, since they’re just meant as examples and we will be writing our own.

Visibility Modifiers

What we need to do is to write a test method that can access the twitterWebView property of the ViewController class. This actually presents a little bit of a hassle that we haven’t had to consider before. Swift considers all the classes in the PragmaticTweets target to be one module, and classes in a module can see each other’s properties and methods by default. However, PragmaticTweetsTests is a different target and thus a different module, so it cannot see the methods or ...

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