On Fri, May 30, 2014 at 4:22 PM, Luther Baker lutherbaker@... [testdrivendevelopment] <testdrivendevelopment@...> wrote:
I don't know anything about iOS programming, so what I say might be completely useless to you. ?Anyway I will try a suggestion:
Can you imagine to test drive not the view themselves, but the code that builds the view? ?If this was a web application, I may want to write something like the view builder:
... view.addHeading("foo"); view.addParagraph("bar"); ... the view object contains methods that make calls to the display technology. ?In html that would be just
void addHeading(String content) { ? this.html += " " + content + "";} in iOS you would have calls to the iOS APIs in there. ?The view builders would know nothing of iOS and could be easily test-driven.
Once you have a? void addGrayedOutButton(String title) method working, and you know that it works because you've seen it working once, you shouldn't need much more testing unless you change its body.
Matteo ? |