こんにちは、GHUnit を使用して単体テストを作成しようとしていますが、例外があります。AFNetWorking と GHUnit
例外 'GHTestFailureException' の間の互換性の問題だと思います。理由: 'failed' *最初のスロー コール スタック: (0x1de4012 0x163fe7e 0x1e6cfb1 0x2a4c1 0x2f20 0x137a4 0x191553f 0x1927014 0x19177d5 0x1d8aaf5 0x1d89f44 0x1d89e1b 0x217777e3
NSURL *url = [NSURL @"https://www.myWebsite.com"];
NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:60.0];
AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc]initWithRequest:theRequest];
[operation setAuthenticationChallengeBlock:^(NSURLConnection *connection, NSURLAuthenticationChallenge *challenge) {
NSURLCredential *newCredential = [NSURLCredential credentialWithUser:@"login" password:@"password" persistence:NSURLCredentialPersistenceForSession];
[challenge.sender useCredential:newCredential forAuthenticationChallenge:challenge];
}];
NSLog(@"Response from %@",response);
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
GHFail(@"failed"); }];
[operation start];
[operation waitUntilFinished];