|
1 /* |
|
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __MTCPCLIENTTESTCASE_H__ |
|
20 #define __MTCPCLIENTTESTCASE_H__ |
|
21 |
|
22 class MTcpClientTestCase |
|
23 { |
|
24 public: |
|
25 /* |
|
26 This method should return a descriptor that contains the display name of the test case. |
|
27 */ |
|
28 virtual const TDesC& TestCaseName() const = 0; |
|
29 |
|
30 /* |
|
31 This method should return the total number of transactions that are opened and involved |
|
32 in the test case. This number can be dynamic during the running of the test, an example |
|
33 of this would be if transactions are cancelled and therefore those should removed from |
|
34 the count. The test HTTP client uses this value so it knows when all the transactions |
|
35 have completed. |
|
36 */ |
|
37 virtual TInt TotalTransactionCount () const = 0; |
|
38 |
|
39 /* |
|
40 This method should return the number of transactions on a giving connection index. For |
|
41 tests that open a number of connections on a server, this method should return the |
|
42 number of transactions on a connection identified by its index (ie starting from 0). |
|
43 Tests that don't use multiple conenctions, this should simply return the same value as |
|
44 TotalTransactionCount(0). |
|
45 */ |
|
46 virtual TInt TransactionCount() const = 0; |
|
47 |
|
48 /* |
|
49 This method should return the raw request data that is expected to be reeived by the |
|
50 server for a giving connection and transaction on that connection. The connection |
|
51 is indentified by its index and then the transaction index on that connection. For |
|
52 instance, for the 3rd transaction on the 2nd connection will result in aConnectionIndex = 1 |
|
53 and aTransIndex = 2. |
|
54 */ |
|
55 virtual const TDesC8& GetRawRequest(TInt aTransIndex) = 0; |
|
56 |
|
57 /* |
|
58 This method should return the raw response data that the server should return for a |
|
59 given transaction. This is similar to GetRawRequest() with the parameter values. |
|
60 */ |
|
61 virtual const TDesC8& GetRawResponse(TInt aTransIndex) = 0; |
|
62 }; |
|
63 |
|
64 #endif // __MTcpClientTestCase_H__ |