__block BOOL someConditionIsMet = NO;
[NetworkingManager someNetworkCallSuccess:(void (^)(NSURLSessionDataTask *task, id responseObject)){
someConditionisMet = YES;
} failure:(void (^)(NSURLSessionDataTask *task, NSError *error)){
someConditionisMet = NO;
}];
[self stallRunLoopUntilConditionIsMet:^BOOL{
return (_someConditionIsMet == YES);
} timeout:20];
XCTAssertTrue(testTheCondition, @"the condition wasn't true");
Jim Schultz, [email protected]
FOTestKit 基于 MIT 许可协议。有关更多信息,请参阅 LICENSE 文件。