Re: NSOperation with unit test
Re: NSOperation with unit test
- Subject: Re: NSOperation with unit test
- From: Heath Borders <email@hidden>
- Date: Tue, 22 Mar 2011 22:40:46 -0500
Your NSOperation is probably running on a background thread managed by
the NSOperationQueue. Your test needs to wait until the
NSOperationQueue has processed all its tasks.
-Heath Borders
email@hidden
Twitter: heathborders
http://heath-tech.blogspot.com
On Tue, Mar 22, 2011 at 10:35 PM, Shane
<email@hidden> wrote:
> Hi,
>
> I am trying to write a unit test for a class that inherits from
> NSOperation. And I've implemented this class just as I did in my
> application (which works) and the test case is running, but when the
> 'addOperation:myClass' on the NSOperationQueue is called within the
> test method, I don't see that my NSOperation class is being executed.
>
> Is there something different about running NSOperations within a unit test?
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> 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:
>
> This email sent to email@hidden
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden