test_subject = [[ViewController alloc] init];
(void) [test_subject view];
STAssertNotNil(test_subject, @"Could not create test subject.");
(void) [test_subject view];
[COLOR=red]STAssertNotNil(test_subject.textField, @"Text field is nil.");[/COLOR]
[test_subject.textField setText: @"30"];
NSLog(@"$$$ currentage early: = %@", [test_subject.textField text]);
Any idea of why the text field itself would be null? And how to fix that? : )
@property (weak, nonatomic) IBOutlet UITextField *textField;
This all makes perfect sense. I'm learning from the official Apple beginner's tutorial, but elaborated a bit after finishing it to use it for my own little app. Tutorial is here: http://developer.apple.com/library/...ptual/iPhone101/Articles/00_Introduction.html
I don't know what this means. You've only posted partial code of one method. Is that a "test" or not? How are these tests run? Do you mean you're creating unit tests or some other kind of tests?I am using it with a nib. And I will say that everything works perfectly in using the app. I just have all of these problems in setting up tests.
Show your code. Ideally, show enough code that someone else can run it. Obviously, that would include nibs, project file, and source code.So now I am trying to use initWithNibName but with no luck either. Or should I be trying to initialize each UI component separately?