|
1 /* |
|
2 * Copyright (c) 2006 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 the License "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 |
|
20 |
|
21 // INCLUDE FILES |
|
22 #include <e32math.h> |
|
23 #include "DownloadMgrBCTest.h" |
|
24 |
|
25 // EXTERNAL DATA STRUCTURES |
|
26 // None |
|
27 |
|
28 // EXTERNAL FUNCTION PROTOTYPES |
|
29 // None |
|
30 |
|
31 // CONSTANTS |
|
32 // None |
|
33 |
|
34 // MACROS |
|
35 // None |
|
36 |
|
37 // LOCAL CONSTANTS AND MACROS |
|
38 // None |
|
39 |
|
40 // MODULE DATA STRUCTURES |
|
41 // None |
|
42 |
|
43 // LOCAL FUNCTION PROTOTYPES |
|
44 // None |
|
45 |
|
46 // FORWARD DECLARATIONS |
|
47 // None |
|
48 |
|
49 // ==================== LOCAL FUNCTIONS ======================================= |
|
50 |
|
51 // ============================ MEMBER FUNCTIONS =============================== |
|
52 |
|
53 /* |
|
54 ------------------------------------------------------------------------------- |
|
55 |
|
56 Class: CDownloadMgrClientApiTest |
|
57 |
|
58 Method: InteractionsOkToExitLTest |
|
59 |
|
60 Description: Test the CDownloadMgrUiUserInteractions OkToExitL method. |
|
61 |
|
62 Parameters: TTestResult& aErrorDescription: out: |
|
63 Test result and on error case a short description of error |
|
64 |
|
65 Return Values: TInt: Always KErrNone to indicate that test was valid |
|
66 |
|
67 Errors/Exceptions: None |
|
68 |
|
69 Status: Proposal |
|
70 |
|
71 ------------------------------------------------------------------------------- |
|
72 */ |
|
73 TInt CDownloadMgrClientApiTest::InteractionsOkToExitLTest( TTestResult& aResult ) |
|
74 { |
|
75 /* Simple server connect */ |
|
76 _LIT( KDefinition ,"State"); |
|
77 _LIT( KData ,"Test the CDownloadMgrUiUserInteractions OkToExitL method"); |
|
78 TestModuleIf().Printf( 0, KDefinition, KData ); |
|
79 |
|
80 _LIT( KData2 ,"Finished"); |
|
81 TestModuleIf().Printf( 0, KDefinition, KData2 ); |
|
82 |
|
83 _LIT( KDescription , "Test case failed" ); |
|
84 aResult.SetResult( KErrGeneral, KDescription ); |
|
85 |
|
86 // Case was executed |
|
87 return KErrNone; |
|
88 } |
|
89 |
|
90 /* |
|
91 ------------------------------------------------------------------------------- |
|
92 |
|
93 Class: CDownloadMgrClientApiTest |
|
94 |
|
95 Method: InteractionsPrepareToExitWithViewIdTest |
|
96 |
|
97 Description: Test the CDownloadMgrUiUserInteractions PrepareToExit method with ViewId argument. |
|
98 |
|
99 Parameters: TTestResult& aErrorDescription: out: |
|
100 Test result and on error case a short description of error |
|
101 |
|
102 Return Values: TInt: Always KErrNone to indicate that test was valid |
|
103 |
|
104 Errors/Exceptions: None |
|
105 |
|
106 Status: Proposal |
|
107 |
|
108 ------------------------------------------------------------------------------- |
|
109 */ |
|
110 TInt CDownloadMgrClientApiTest::InteractionsPrepareToExitWithViewIdTest( TTestResult& aResult ) |
|
111 { |
|
112 /* Simple server connect */ |
|
113 _LIT( KDefinition ,"State"); |
|
114 _LIT( KData ,"Test the CDownloadMgrUiUserInteractions PrepareToExit method with ViewId argument"); |
|
115 TestModuleIf().Printf( 0, KDefinition, KData ); |
|
116 |
|
117 _LIT( KData2 ,"Finished"); |
|
118 TestModuleIf().Printf( 0, KDefinition, KData2 ); |
|
119 |
|
120 _LIT( KDescription , "Test case failed" ); |
|
121 aResult.SetResult( KErrGeneral, KDescription ); |
|
122 |
|
123 // Case was executed |
|
124 return KErrNone; |
|
125 } |
|
126 |
|
127 /* |
|
128 ------------------------------------------------------------------------------- |
|
129 |
|
130 Class: CDownloadMgrClientApiTest |
|
131 |
|
132 Method: InteractionsPrepareToExitTest |
|
133 |
|
134 Description: Test the CDownloadMgrUiUserInteractions PrepareToExit method. |
|
135 |
|
136 Parameters: TTestResult& aErrorDescription: out: |
|
137 Test result and on error case a short description of error |
|
138 |
|
139 Return Values: TInt: Always KErrNone to indicate that test was valid |
|
140 |
|
141 Errors/Exceptions: None |
|
142 |
|
143 Status: Proposal |
|
144 |
|
145 ------------------------------------------------------------------------------- |
|
146 */ |
|
147 TInt CDownloadMgrClientApiTest::InteractionsPrepareToExitTest( TTestResult& aResult ) |
|
148 { |
|
149 /* Simple server connect */ |
|
150 _LIT( KDefinition ,"State"); |
|
151 _LIT( KData ,"Test the CDownloadMgrUiUserInteractions PrepareToExit method"); |
|
152 TestModuleIf().Printf( 0, KDefinition, KData ); |
|
153 |
|
154 _LIT( KData2 ,"Finished"); |
|
155 TestModuleIf().Printf( 0, KDefinition, KData2 ); |
|
156 |
|
157 _LIT( KDescription , "Test case failed" ); |
|
158 aResult.SetResult( KErrGeneral, KDescription ); |
|
159 |
|
160 // Case was executed |
|
161 return KErrNone; |
|
162 } |
|
163 |
|
164 /* |
|
165 ------------------------------------------------------------------------------- |
|
166 |
|
167 Class: CDownloadMgrClientApiTest |
|
168 |
|
169 Method: InteractionsHandleDownloadLTest |
|
170 |
|
171 Description: Test the CDownloadMgrUiUserInteractions HandleDownloadL method. |
|
172 |
|
173 Parameters: TTestResult& aErrorDescription: out: |
|
174 Test result and on error case a short description of error |
|
175 |
|
176 Return Values: TInt: Always KErrNone to indicate that test was valid |
|
177 |
|
178 Errors/Exceptions: None |
|
179 |
|
180 Status: Proposal |
|
181 |
|
182 ------------------------------------------------------------------------------- |
|
183 */ |
|
184 TInt CDownloadMgrClientApiTest::InteractionsHandleDownloadLTest( TTestResult& aResult ) |
|
185 { |
|
186 /* Simple server connect */ |
|
187 _LIT( KDefinition ,"State"); |
|
188 _LIT( KData ,"Test the CDownloadMgrUiUserInteractions HandleDownloadL method"); |
|
189 TestModuleIf().Printf( 0, KDefinition, KData ); |
|
190 |
|
191 _LIT( KData2 ,"Finished"); |
|
192 TestModuleIf().Printf( 0, KDefinition, KData2 ); |
|
193 |
|
194 _LIT( KDescription , "Test case failed" ); |
|
195 aResult.SetResult( KErrGeneral, KDescription ); |
|
196 |
|
197 // Case was executed |
|
198 return KErrNone; |
|
199 } |
|
200 |
|
201 // ================= OTHER EXPORTED FUNCTIONS ================================= |
|
202 |
|
203 // End of File |