ASINetworkQueueTests.h
2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
//
// ASINetworkQueueTests.h
// Part of ASIHTTPRequest -> http://allseeing-i.com/ASIHTTPRequest
//
// Created by Ben Copsey on 08/11/2008.
// Copyright 2008 All-Seeing Interactive. All rights reserved.
//
#import "ASITestCase.h"
/*
IMPORTANT
Code that appears in these tests is not for general purpose use.
You should not use [networkQueue waitUntilAllOperationsAreFinished] or [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.25]] in your own software.
They are used here to force a queue to operate synchronously to simplify writing the tests.
IMPORTANT
*/
@class ASIHTTPRequest;
@class ASINetworkQueue;
@interface ASINetworkQueueTests : ASITestCase {
ASIHTTPRequest *requestThatShouldFail;
BOOL complete;
BOOL request_didfail;
BOOL request_succeeded;
float progress;
int addedRequests;
NSOperationQueue *immediateCancelQueue;
NSMutableArray *failedRequests;
NSMutableArray *finishedRequests;
ASINetworkQueue *releaseTestQueue;
ASINetworkQueue *cancelQueue;
int authenticationPromptCount;
ASINetworkQueue *postQueue;
ASINetworkQueue *testNTLMQueue;
ASINetworkQueue *addMoreRequestsQueue;
int requestsFinishedCount;
BOOL started;
BOOL finished;
BOOL failed;
BOOL headFailed;
BOOL receivedResponseHeaders;
int queueFinishedCallCount;
}
- (void)testFailure;
- (void)testFailureCancelsOtherRequests;
- (void)testDownloadProgress;
- (void)testUploadProgress;
- (void)testProgressWithAuthentication;
- (void)testWithNoListener;
- (void)testPartialResume;
- (void)testImmediateCancel;
- (void)setProgress:(float)newProgress;
- (void)testSubclass;
- (void)testQueueReleaseOnRequestComplete;
- (void)testQueueReleaseOnQueueComplete;
- (void)testMultipleDownloadsThrottlingBandwidth;
- (void)testMultipleUploadsThrottlingBandwidth;
- (void)testDelegateAuthenticationCredentialsReuse;
- (void)testPOSTWithAuthentication;
- (void)testHEADFailure;
@property (retain) NSOperationQueue *immediateCancelQueue;
@property (retain) NSMutableArray *failedRequests;
@property (retain) NSMutableArray *finishedRequests;
@property (retain) ASINetworkQueue *releaseTestQueue;
@property (retain) ASINetworkQueue *cancelQueue;
@property (retain) ASINetworkQueue *postQueue;
@property (retain) ASINetworkQueue *testNTLMQueue;
@property (retain) ASINetworkQueue *addMoreRequestsQueue;
@end