os/ossrv/lowlevellibsandfws/pluginfw/Framework/DiscovererTest/DiscovererUnitTest.inl
Update contrib.
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Implementation of the CDiscoverer Unit Test class methods.
18 _LIT(KDiscovererCreateAndDestroyUnitTest,"CDiscoverer_CreateAndDestroy_UnitTest");
20 inline TInt CDiscoverer_CreateAndDestroy_UnitTest::RunError(TInt aError)
22 // The RunL left so chain to the base first and then cleanup
23 TInt error = CUnitTest::RunError(aError); // Chain to base
25 delete iStateAccessor;
26 delete iCtorValidator;
27 delete iDtorValidator;
31 inline CDiscoverer_CreateAndDestroy_UnitTest::~CDiscoverer_CreateAndDestroy_UnitTest()
33 // Simply delete our test class instances
34 // and close any open handles
36 delete iStateAccessor;
37 delete iCtorValidator;
38 delete iDtorValidator;
41 inline CDiscoverer_CreateAndDestroy_UnitTest::CDiscoverer_CreateAndDestroy_UnitTest(CDataLogger& aDataLogger,
42 MUnitTestObserver& aObserver)
43 : CUnitTest(KDiscovererCreateAndDestroyUnitTest, aDataLogger, aObserver)
48 // ______________________________________________________________________________
50 _LIT(KDiscovererMountDriveUnitTest,"CDiscoverer_MountDrive_UnitTest");
52 inline TInt CDiscoverer_MountDrive_UnitTest::RunError(TInt aError)
54 // The RunL left so chain to the base first and then cleanup
55 TInt error = CUnitTest::RunError(aError); // Chain to base
57 delete iStateAccessor;
58 /* delete any validators used */
59 delete iCtorValidator;
60 delete iMountValidator;
61 delete iDtorValidator;
65 inline CDiscoverer_MountDrive_UnitTest::~CDiscoverer_MountDrive_UnitTest()
67 // Simply delete our test class instance
69 delete iStateAccessor;
70 /* delete any validators used */
71 delete iCtorValidator;
72 delete iMountValidator;
73 delete iDtorValidator;
76 inline CDiscoverer_MountDrive_UnitTest::CDiscoverer_MountDrive_UnitTest(CDataLogger& aDataLogger,
77 MUnitTestObserver& aObserver)
78 : CUnitTest(KDiscovererMountDriveUnitTest, aDataLogger, aObserver)
83 // ______________________________________________________________________________
85 _LIT(KDiscovererUnmountDriveUnitTest,"CDiscoverer_UnmountDrive_UnitTest");
87 inline TInt CDiscoverer_UnmountDrive_UnitTest::RunError(TInt aError)
89 // The RunL left so chain to the base first and then cleanup
90 TInt error = CUnitTest::RunError(aError); // Chain to base
92 delete iStateAccessor;
93 /* delete any validators used */
94 delete iCtorValidator;
95 delete iUnmountValidator;
96 delete iDtorValidator;
100 inline CDiscoverer_UnmountDrive_UnitTest::~CDiscoverer_UnmountDrive_UnitTest()
102 // Simply delete our test class instance
104 delete iStateAccessor;
105 /* delete any validators used */
106 delete iCtorValidator;
107 delete iUnmountValidator;
108 delete iDtorValidator;
111 inline CDiscoverer_UnmountDrive_UnitTest::CDiscoverer_UnmountDrive_UnitTest(CDataLogger& aDataLogger,
112 MUnitTestObserver& aObserver)
113 : CUnitTest(KDiscovererUnmountDriveUnitTest, aDataLogger, aObserver)
118 // ______________________________________________________________________________
120 _LIT(KDiscovererIsValidEntryLUnitTest,"CDiscoverer_IsValidEntryL_UnitTest");
122 inline TInt CDiscoverer_IsValidEntryL_UnitTest::RunError(TInt aError)
124 // The RunL left so chain to the base first and then cleanup
125 // The RunL left so chain to the base first and then cleanup
126 TInt error = CUnitTest::RunError(aError); // Chain to base
128 delete iStateAccessor;
129 /* delete any validators used */
130 delete iCtorValidator;
131 delete iIsValidEntryValidator;
132 delete iDtorValidator;
136 inline CDiscoverer_IsValidEntryL_UnitTest::~CDiscoverer_IsValidEntryL_UnitTest()
138 // Simply delete our test class instance
140 delete iStateAccessor;
141 delete iCtorValidator;
142 delete iIsValidEntryValidator;
143 delete iDtorValidator;
146 inline CDiscoverer_IsValidEntryL_UnitTest::CDiscoverer_IsValidEntryL_UnitTest(CDataLogger& aDataLogger,
147 MUnitTestObserver& aObserver)
148 : CUnitTest(KDiscovererIsValidEntryLUnitTest, aDataLogger, aObserver)
152 // ______________________________________________________________________________
154 _LIT(KDiscovererProcessEntryLUnitTest,"CDiscoverer_ProcessEntryL_UnitTest");
156 inline TInt CDiscoverer_ProcessEntryL_UnitTest::RunError(TInt aError)
158 // The RunL left so chain to the base first and then cleanup
159 TInt error = CUnitTest::RunError(aError); // Chain to base
161 delete iStateAccessor;
162 /* delete any validators used */
163 delete iCtorValidator;
164 delete iProcessEntryValidator;
165 delete iDtorValidator;
169 inline CDiscoverer_ProcessEntryL_UnitTest::~CDiscoverer_ProcessEntryL_UnitTest()
171 // Simply delete our test class instance
173 delete iStateAccessor;
174 delete iCtorValidator;
175 delete iProcessEntryValidator;
176 delete iDtorValidator;
179 inline CDiscoverer_ProcessEntryL_UnitTest::CDiscoverer_ProcessEntryL_UnitTest(CDataLogger& aDataLogger,
180 MUnitTestObserver& aObserver)
181 : CUnitTest(KDiscovererProcessEntryLUnitTest, aDataLogger, aObserver)
186 // ______________________________________________________________________________
188 _LIT(KDiscovererCompleteNotificationProcessingUnitTest,"CDiscoverer_CompleteNotificationProcessing_UnitTest");
190 inline TInt CDiscoverer_CompleteNotificationProcessing_UnitTest::RunError(TInt aError)
192 // The RunL left so chain to the base first and then cleanup
193 TInt error = CUnitTest::RunError(aError); // Chain to base
195 delete iStateAccessor;
196 /* delete any validators used */
197 delete iCtorValidator;
198 delete iCompleteNotificationProcessingValidator;
199 delete iDtorValidator;
203 inline CDiscoverer_CompleteNotificationProcessing_UnitTest::~CDiscoverer_CompleteNotificationProcessing_UnitTest()
205 // Simply delete our test class instance
207 delete iStateAccessor;
208 delete iCtorValidator;
209 delete iCompleteNotificationProcessingValidator;
210 delete iDtorValidator;
213 inline CDiscoverer_CompleteNotificationProcessing_UnitTest::CDiscoverer_CompleteNotificationProcessing_UnitTest(CDataLogger& aDataLogger,
214 MUnitTestObserver& aObserver)
215 : CUnitTest(KDiscovererCompleteNotificationProcessingUnitTest, aDataLogger, aObserver)
221 // ______________________________________________________________________________
223 _LIT(KDiscovererNotificationUnitTest,"CDiscoverer_Notification_UnitTest");
225 inline TInt CDiscoverer_Notification_UnitTest::RunError(TInt aError)
227 // The RunL left so chain to the base first and then cleanup
228 TInt error = CUnitTest::RunError(aError); // Chain to base
230 delete iStateAccessor;
231 /* delete any validators used */
232 delete iCtorValidator;
233 delete iNotificationValidator;
234 delete iDtorValidator;
238 inline CDiscoverer_Notification_UnitTest::~CDiscoverer_Notification_UnitTest()
240 // Simply delete our test class instance
242 delete iStateAccessor;
243 delete iCtorValidator;
244 delete iNotificationValidator;
245 delete iDtorValidator;
248 inline CDiscoverer_Notification_UnitTest::CDiscoverer_Notification_UnitTest(CDataLogger& aDataLogger,
249 MUnitTestObserver& aObserver)
250 : CUnitTest(KDiscovererNotificationUnitTest, aDataLogger, aObserver)
255 // ______________________________________________________________________________
257 _LIT(KDiscovererResumeUnitTest,"CDiscoverer_SuspendResume_UnitTest");
259 inline TInt CDiscoverer_SuspendResume_UnitTest::RunError(TInt aError)
261 // The RunL left so chain to the base first and then cleanup
262 TInt error = CUnitTest::RunError(aError); // Chain to base
264 delete iStateAccessor;
265 /* delete any validators used */
266 delete iCtorValidator;
267 delete iNotificationValidator;
268 delete iSuspendValidator;
269 delete iResumeValidator;
270 delete iDtorValidator;
274 inline CDiscoverer_SuspendResume_UnitTest::~CDiscoverer_SuspendResume_UnitTest()
276 // Simply delete our test class instance
278 delete iStateAccessor;
279 delete iCtorValidator;
280 delete iNotificationValidator;
281 delete iSuspendValidator;
282 delete iResumeValidator;
283 delete iDtorValidator;
286 inline CDiscoverer_SuspendResume_UnitTest::CDiscoverer_SuspendResume_UnitTest(CDataLogger& aDataLogger,
287 MUnitTestObserver& aObserver)
288 : CUnitTest(KDiscovererResumeUnitTest, aDataLogger, aObserver)
293 // ______________________________________________________________________________
295 _LIT(KDiscovererScanDirectoryUnitTest,"CDiscoverer_ScanDirectory_UnitTest");
297 inline TInt CDiscoverer_ScanDirectory_UnitTest::RunError(TInt aError)
299 // The RunL left so chain to the base first and then cleanup
300 TInt error = CUnitTest::RunError(aError); // Chain to base
302 delete iStateAccessor;
303 /* delete any validators used */
304 delete iCtorValidator;
305 delete iScanDirectoryValidator;
306 delete iDtorValidator;
310 inline CDiscoverer_ScanDirectory_UnitTest::~CDiscoverer_ScanDirectory_UnitTest()
312 // Simply delete our test class instance
314 delete iStateAccessor;
315 delete iCtorValidator;
316 delete iScanDirectoryValidator;
317 delete iDtorValidator;
320 inline CDiscoverer_ScanDirectory_UnitTest::CDiscoverer_ScanDirectory_UnitTest(CDataLogger& aDataLogger,
321 MUnitTestObserver& aObserver)
322 : CUnitTest(KDiscovererScanDirectoryUnitTest, aDataLogger, aObserver)
327 // ______________________________________________________________________________
329 _LIT(KDiscovererScanDirectoryCancelUnitTest,"CDiscoverer_ScanDirectoryCancel_UnitTest");
331 inline TInt CDiscoverer_ScanDirectoryCancel_UnitTest::RunError(TInt aError)
333 // The RunL left so chain to the base first and then cleanup
334 TInt error = CUnitTest::RunError(aError); // Chain to base
336 delete iStateAccessor;
337 /* delete any validators used */
338 delete iCtorValidator;
339 delete iScanDirectoryCancelValidator;
340 delete iDtorValidator;
344 inline CDiscoverer_ScanDirectoryCancel_UnitTest::~CDiscoverer_ScanDirectoryCancel_UnitTest()
346 // Simply delete our test class instance
348 delete iStateAccessor;
349 delete iCtorValidator;
350 delete iScanDirectoryCancelValidator;
351 delete iDtorValidator;
354 inline CDiscoverer_ScanDirectoryCancel_UnitTest::CDiscoverer_ScanDirectoryCancel_UnitTest(CDataLogger& aDataLogger,
355 MUnitTestObserver& aObserver)
356 : CUnitTest(KDiscovererScanDirectoryCancelUnitTest, aDataLogger, aObserver)
361 // ______________________________________________________________________________
363 _LIT(KDiscovererScanDirectoryIncrementUnitTest,"CDiscoverer_ScanDirectoryIncrement_UnitTest");
365 inline TInt CDiscoverer_ScanDirectoryIncrement_UnitTest::RunError(TInt aError)
367 // The RunL left so chain to the base first and then cleanup
368 TInt error = CUnitTest::RunError(aError); // Chain to base
370 delete iStateAccessor;
371 /* delete any validators used */
372 delete iCtorValidator;
373 delete iScanDirectoryIncrementValidator;
374 delete iDtorValidator;
378 inline CDiscoverer_ScanDirectoryIncrement_UnitTest::~CDiscoverer_ScanDirectoryIncrement_UnitTest()
380 // Simply delete our test class instance
382 delete iStateAccessor;
383 delete iCtorValidator;
384 delete iScanDirectoryIncrementValidator;
385 delete iDtorValidator;
388 inline CDiscoverer_ScanDirectoryIncrement_UnitTest::CDiscoverer_ScanDirectoryIncrement_UnitTest(CDataLogger& aDataLogger,
389 MUnitTestObserver& aObserver)
390 : CUnitTest(KDiscovererScanDirectoryIncrementUnitTest, aDataLogger, aObserver)