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