Hi, I'm using OCUnit injected into my project executable in xCode to test a class that contains an NSSynthesizer.

The following didFinishSpeaking method gets called when I run the app normally, but not in the test.

- (id)init {
...
        speechSynthesizer = [NSSpeechSynthesizer new];
        [speechSynthesizer setDelegate:self];
...
}

- (void)speechSynthesizer:(NSSpeechSynthesizer*)sender didFinishSpeaking:(BOOL)success {
        [startButton setEnabled:TRUE];
        [stopButton setEnabled:FALSE];
}

// the offending test method
- (void)testButtons {
...
        [controller stopIt:nil];
        
        // The two asserts fail because the delegate was never called   
        STAssertFalse([stopButton isEnabled], @"");
        STAssertTrue([startButton isEnabled], @"");   
}

Any ideas?  Thanks!
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to