cómo hacer una prueba de unidad de solicitud de red

estoy haciendo unGET solicitud para recuperarJSON datos conAFNetworking como este código a continuación:

        NSURL *url = [NSURL URLWithString:K_THINKERBELL_SERVER_URL];
    AFHTTPClient *httpClient = [[AFHTTPClient alloc] initWithBaseURL:url];
    Account *ac = [[Account alloc]init];
    NSMutableURLRequest *request = [httpClient requestWithMethod:@"GET" path:[NSString stringWithFormat:@"/user/%@/event/%@",ac.uid,eventID]  parameters:nil];

    AFHTTPRequestOperation *operation = [httpClient HTTPRequestOperationWithRequest:request
                                                                            success:^(AFHTTPRequestOperation *operation, id responseObject) {
                                                                                NSError *error = nil;
                                                                                NSDictionary *JSON = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingAllowFragments error:&error];
                                                                                if (error) {
                                                                                }

                                                                                [self.delegate NextMeetingFound:[[Meeting alloc]init] meetingData:JSON];

                                                                            }
                                                                            failure:^(AFHTTPRequestOperation *operation, NSError *error){
                                                                            }];
    [httpClient enqueueHTTPRequestOperation:operation];

la cosa es que quiero crear una prueba unitaria basada en estos datos, pero no quiero que la prueba realmente haga la solicitud. Quiero una estructura predefinida volverá como la respuesta. Soy un poco nuevo en las pruebas unitarias, y puse un poco deOCMock pero no puedo averiguar cómo manejar esto.

Respuestas a la pregunta(1)

Su respuesta a la pregunta