dave morris
unread,Jun 29, 2011, 9:33:49 AM6/29/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to GHUnit
I have a GHUnit Async test case called
"testStartConnectionWithRequest" that does the following:
* Makes an HTTP request with the test class itself as the delgate
* Calls connectionDidFinishLoading when the request is complete
* Calls another custom callback function at the end of
connectionDidFinishLoading called
imageServerCallFinishedWithPayload:(NSData *)payload
withError:(BOOL)error
withLocalErrorString:(NSString
*)localErrorString
withExtras:(PayloadExtras *)extras
* Calls [self notify:kGHUnitWaitStatusSuccess
forSelector:@selector(testStartConnectionWithRequest)];
When I run through it and set breakpoints, the code reaches all of the
expected points, and then it hangs on "GHTesting runTestWithTarget".
In the debug sidebar, I see the following:
0 objc_msgSend
.....
3 -[NSAutoreleasePool release]
4 +[GHTesting
runTestWithTarget:selecter:exception:interval:reraiseExceptions:]
5 -[GHTest run:]
6 -[GHUnitIPhoneTestViewController _runTest]
7 -[UIApplication sendAction:to:from:forEvent:]
.....
24 UIApplication Main
25 main
When I call notify:kGHUnitWaitStatusFailure instead of success, in the
same spot in my custom callback, the test case finishes with the
following error:
Name: GHTestFailureException
File: /Users/gabe/Projects/gh-unit/Classes/GHAsyncTestCase.m
Line: 129
Reason: Request finished with the wrong status: 1 != 2
Any thoughts on why this might be happening?
Thanks,
Dave