Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Now that I can call my method with input under my control, I need to inspect what that method does and ensure that the results are consistent with the app’s requirements. I know that the result of running the method should be to change the text of a label, so I need a way to discover what happens to that label. I can’t pass that label in as a parameter to the method, because the API contract for the UITextFieldDelegate method doesn’t allow for it. The object that provides my temperature conversion method will need a property for the label so that the method can find it.
As with the input text field, it looks like the only part of the label this method will need to deal with is its text property, so it seems I can reuse the FakeTextContainer class I’ve already built. The test case now looks like this: