TwitterNetworkLayerTests/TNLRequestOperationTest.m [441:467]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        XCTAssertTrue(response.responseBodyWasInFile);
    }];

#if !RUN_TESTS_WITH_CANNED_RESPONSES

    // Background - Normal
    config.responseDataConsumptionMode = TNLResponseDataConsumptionModeStoreInMemory;
    config.executionMode = TNLRequestExecutionModeBackground;

    [self performRequest:request config:config args:args callback:^(TestJSONResponse *response) {
        NSError *error = CoersedOperationError(response.operationError);
        XCTAssertEqualObjects(error.domain, TNLErrorDomain);
        XCTAssertEqual(error.code, TNLErrorCodeRequestInvalidBackgroundRequest);
    }];

#if RUN_BACKGROUND_REQUESTS

    // Background - Save to Disk
    config.responseDataConsumptionMode = TNLResponseDataConsumptionModeSaveToDisk;
    config.executionMode = TNLRequestExecutionModeInApp;

    [self performRequest:request config:config args:args callback:^(TestJSONResponse *response) {
        XCTAssertEqual(response.info.statusCode, 200);
        XCTAssertNotNil(response.result);
        XCTAssertEqualObjects([response.result[@"headers"] tnl_objectForCaseInsensitiveKey:@"TNL-Version"], TNLVersion());
        XCTAssertEqual([[response.result[@"headers"] tnl_objectForCaseInsensitiveKey:@"Content-Length"] integerValue], (NSInteger)0);
        XCTAssertEqualObjects(response.result[@"args"], args);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



TwitterNetworkLayerTests/TNLRequestOperationTest.m [939:965]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        XCTAssertTrue(response.responseBodyWasInFile);
    }];

#if !RUN_TESTS_WITH_CANNED_RESPONSES

    // Background - Normal
    config.responseDataConsumptionMode = TNLResponseDataConsumptionModeStoreInMemory;
    config.executionMode = TNLRequestExecutionModeBackground;

    [self performRequest:request config:config args:args callback:^(TestJSONResponse *response) {
        NSError *error = CoersedOperationError(response.operationError);
        XCTAssertEqualObjects(error.domain, TNLErrorDomain);
        XCTAssertEqual(error.code, TNLErrorCodeRequestInvalidBackgroundRequest);
    }];

#if RUN_BACKGROUND_REQUESTS

    // Background - Save to Disk
    config.responseDataConsumptionMode = TNLResponseDataConsumptionModeSaveToDisk;
    config.executionMode = TNLRequestExecutionModeInApp;

    [self performRequest:request config:config args:args callback:^(TestJSONResponse *response) {
        XCTAssertEqual(response.info.statusCode, 200);
        XCTAssertNotNil(response.result);
        XCTAssertEqualObjects([response.result[@"headers"] tnl_objectForCaseInsensitiveKey:@"TNL-Version"], TNLVersion());
        XCTAssertEqual([[response.result[@"headers"] tnl_objectForCaseInsensitiveKey:@"Content-Length"] integerValue], (NSInteger)0);
        XCTAssertEqualObjects(response.result[@"args"], args);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



