// STAssertNotNil(error,@"Failed to generate an error for a bad host - this test may fail when your DNS server redirects you to another page when it can't find a domain name (eg OpenDNS)");
// success = [[request1 dataString] isEqualToString:@"This is the expected content for the first string"];
// STAssertTrue(success,@"Failed to download the correct data for request 1");
//
// success = ([request2 error] == nil);
// STAssertTrue(success,@"Request 2 failed");
//
// success = [[request2 dataString] isEqualToString:@"This is the expected content for the second string"];
// STAssertTrue(success,@"Failed to download the correct data for request 2");
//
// success = ([request3 error] == nil);
// STAssertTrue(success,@"Request 3 failed");
//
// success = [[request3 dataString] isEqualToString:@"This is the expected content for the third string"];
// STAssertTrue(success,@"Failed to download the correct data for request 3");
//
// success = ([request4 error] != nil);
// STAssertTrue(success,@"Request 4 succeed when it should have failed - this test may fail when your DNS server redirects you to another page when it can't find a domain name (eg OpenDNS)");
STAssertNotNil(error,@"Failed to generate an error for a bad host - this test may fail when your DNS server redirects you to another page when it can't find a domain name (eg OpenDNS)");
success=[[request1dataString]isEqualToString:@"This is the expected content for the first string"];
STAssertTrue(success,@"Failed to download the correct data for request 1");
success=([request2error]==nil);
STAssertTrue(success,@"Request 2 failed");
success=[[request2dataString]isEqualToString:@"This is the expected content for the second string"];
STAssertTrue(success,@"Failed to download the correct data for request 2");
success=([request3error]==nil);
STAssertTrue(success,@"Request 3 failed");
success=[[request3dataString]isEqualToString:@"This is the expected content for the third string"];
STAssertTrue(success,@"Failed to download the correct data for request 3");
success=([request4error]!=nil);
STAssertTrue(success,@"Request 4 succeed when it should have failed - this test may fail when your DNS server redirects you to another page when it can't find a domain name (eg OpenDNS)");
success=([request5error]==nil);
STAssertTrue(success,@"Request 5 failed");
success=([request5responseStatusCode]==404);
STAssertTrue(success,@"Failed to obtain the correct status code for request 5");
}
-(void)testCookies
{
BOOLsuccess;
//Firstly, let's make sure cocoa still parses cookie dates correctly using the three examples at http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3