os/ossrv/lowlevellibsandfws/pluginfw/Framework/DiscovererTest/DiscovererUnitTest.inl
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // Implementation of the CDiscoverer Unit Test class methods.
    15 // 
    16 //
    17 
    18 _LIT(KDiscovererCreateAndDestroyUnitTest,"CDiscoverer_CreateAndDestroy_UnitTest");
    19 
    20 inline TInt CDiscoverer_CreateAndDestroy_UnitTest::RunError(TInt aError)
    21 	{
    22 	// The RunL left so chain to the base first and then cleanup
    23 	TInt error = CUnitTest::RunError(aError);	// Chain to base
    24 	delete iUTContext;
    25 	delete iStateAccessor;
    26 	delete iCtorValidator;
    27 	delete iDtorValidator;
    28 	return error;
    29 	}
    30 
    31 inline CDiscoverer_CreateAndDestroy_UnitTest::~CDiscoverer_CreateAndDestroy_UnitTest()
    32 	{
    33 	// Simply delete our test class instances
    34 	// and close any open handles
    35 	delete iUTContext;
    36 	delete iStateAccessor;
    37 	delete iCtorValidator;
    38 	delete iDtorValidator;
    39 	}
    40 
    41 inline CDiscoverer_CreateAndDestroy_UnitTest::CDiscoverer_CreateAndDestroy_UnitTest(CDataLogger& aDataLogger,
    42 																	MUnitTestObserver& aObserver)
    43 : CUnitTest(KDiscovererCreateAndDestroyUnitTest, aDataLogger, aObserver)
    44 	{
    45 	//Do nothing
    46 	}
    47 
    48 // ______________________________________________________________________________
    49 //
    50 _LIT(KDiscovererMountDriveUnitTest,"CDiscoverer_MountDrive_UnitTest");
    51 
    52 inline TInt CDiscoverer_MountDrive_UnitTest::RunError(TInt aError)
    53 	{
    54 	// The RunL left so chain to the base first and then cleanup
    55 	TInt error = CUnitTest::RunError(aError);	// Chain to base
    56 	delete iUTContext;
    57 	delete iStateAccessor;
    58 	/* delete any validators used */
    59 	delete iCtorValidator;
    60 	delete iMountValidator;
    61 	delete iDtorValidator;
    62 	return error;
    63 	}
    64 
    65 inline CDiscoverer_MountDrive_UnitTest::~CDiscoverer_MountDrive_UnitTest()
    66 	{
    67 	// Simply delete our test class instance
    68 	delete iUTContext;
    69 	delete iStateAccessor;
    70 	/* delete any validators used */
    71 	delete iCtorValidator;
    72 	delete iMountValidator;
    73 	delete iDtorValidator;
    74 	}
    75 
    76 inline CDiscoverer_MountDrive_UnitTest::CDiscoverer_MountDrive_UnitTest(CDataLogger& aDataLogger,
    77 																	MUnitTestObserver& aObserver)
    78 : CUnitTest(KDiscovererMountDriveUnitTest, aDataLogger, aObserver)
    79 	{
    80 	//Do nothing
    81 	}
    82 
    83 // ______________________________________________________________________________
    84 //
    85 _LIT(KDiscovererUnmountDriveUnitTest,"CDiscoverer_UnmountDrive_UnitTest");
    86 
    87 inline TInt CDiscoverer_UnmountDrive_UnitTest::RunError(TInt aError)
    88 	{
    89 	// The RunL left so chain to the base first and then cleanup
    90 	TInt error = CUnitTest::RunError(aError);	// Chain to base
    91 	delete iUTContext;
    92 	delete iStateAccessor;
    93 	/* delete any validators used */
    94 	delete iCtorValidator;
    95 	delete iUnmountValidator;
    96 	delete iDtorValidator;
    97 	return error;
    98 	}
    99 
   100 inline CDiscoverer_UnmountDrive_UnitTest::~CDiscoverer_UnmountDrive_UnitTest()
   101 	{
   102 	// Simply delete our test class instance
   103 	delete iUTContext;
   104 	delete iStateAccessor;
   105 	/* delete any validators used */
   106 	delete iCtorValidator;
   107 	delete iUnmountValidator;
   108 	delete iDtorValidator;
   109 	}
   110 
   111 inline CDiscoverer_UnmountDrive_UnitTest::CDiscoverer_UnmountDrive_UnitTest(CDataLogger& aDataLogger,
   112 																	MUnitTestObserver& aObserver)
   113 : CUnitTest(KDiscovererUnmountDriveUnitTest, aDataLogger, aObserver)
   114 	{
   115 	//Do nothing
   116 	}
   117 
   118 // ______________________________________________________________________________
   119 //
   120 _LIT(KDiscovererIsValidEntryLUnitTest,"CDiscoverer_IsValidEntryL_UnitTest");
   121 
   122 inline TInt CDiscoverer_IsValidEntryL_UnitTest::RunError(TInt aError)
   123 	{
   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
   127 	delete iUTContext;
   128 	delete iStateAccessor;
   129 	/* delete any validators used */
   130 	delete iCtorValidator;
   131 	delete iIsValidEntryValidator;
   132 	delete iDtorValidator;
   133 	return error;
   134 	}
   135 
   136 inline CDiscoverer_IsValidEntryL_UnitTest::~CDiscoverer_IsValidEntryL_UnitTest()
   137 	{
   138 	// Simply delete our test class instance
   139 	delete iUTContext;
   140 	delete iStateAccessor;
   141 	delete iCtorValidator;
   142 	delete iIsValidEntryValidator;
   143 	delete iDtorValidator;
   144 	}
   145 
   146 inline CDiscoverer_IsValidEntryL_UnitTest::CDiscoverer_IsValidEntryL_UnitTest(CDataLogger& aDataLogger,
   147 																	MUnitTestObserver& aObserver)
   148 : CUnitTest(KDiscovererIsValidEntryLUnitTest, aDataLogger, aObserver)
   149 	{
   150 	//Do nothing
   151 	}
   152 // ______________________________________________________________________________
   153 //
   154 _LIT(KDiscovererProcessEntryLUnitTest,"CDiscoverer_ProcessEntryL_UnitTest");
   155 
   156 inline TInt CDiscoverer_ProcessEntryL_UnitTest::RunError(TInt aError)
   157 	{
   158 	// The RunL left so chain to the base first and then cleanup
   159 	TInt error = CUnitTest::RunError(aError);	// Chain to base
   160 	delete iUTContext;
   161 	delete iStateAccessor;
   162 	/* delete any validators used */
   163 	delete iCtorValidator;
   164 	delete iProcessEntryValidator;
   165 	delete iDtorValidator;
   166 	return error;
   167 	}
   168 
   169 inline CDiscoverer_ProcessEntryL_UnitTest::~CDiscoverer_ProcessEntryL_UnitTest()
   170 	{
   171 	// Simply delete our test class instance
   172 	delete iUTContext;
   173 	delete iStateAccessor;
   174 	delete iCtorValidator;
   175 	delete iProcessEntryValidator;
   176 	delete iDtorValidator;
   177 	}
   178 
   179 inline CDiscoverer_ProcessEntryL_UnitTest::CDiscoverer_ProcessEntryL_UnitTest(CDataLogger& aDataLogger,
   180 																	MUnitTestObserver& aObserver)
   181 : CUnitTest(KDiscovererProcessEntryLUnitTest, aDataLogger, aObserver)
   182 	{
   183 	//Do nothing
   184 	}
   185 
   186 // ______________________________________________________________________________
   187 //
   188 _LIT(KDiscovererCompleteNotificationProcessingUnitTest,"CDiscoverer_CompleteNotificationProcessing_UnitTest");
   189 
   190 inline TInt CDiscoverer_CompleteNotificationProcessing_UnitTest::RunError(TInt aError)
   191 	{
   192 	// The RunL left so chain to the base first and then cleanup
   193 	TInt error = CUnitTest::RunError(aError);	// Chain to base
   194 	delete iUTContext;
   195 	delete iStateAccessor;
   196 	/* delete any validators used */
   197 	delete iCtorValidator;
   198 	delete iCompleteNotificationProcessingValidator;
   199 	delete iDtorValidator;
   200 	return error;
   201 	}
   202 
   203 inline CDiscoverer_CompleteNotificationProcessing_UnitTest::~CDiscoverer_CompleteNotificationProcessing_UnitTest()
   204 	{
   205 	// Simply delete our test class instance
   206 	delete iUTContext;
   207 	delete iStateAccessor;
   208 	delete iCtorValidator;
   209 	delete iCompleteNotificationProcessingValidator;
   210 	delete iDtorValidator;
   211 	}
   212 
   213 inline CDiscoverer_CompleteNotificationProcessing_UnitTest::CDiscoverer_CompleteNotificationProcessing_UnitTest(CDataLogger& aDataLogger,
   214 																	MUnitTestObserver& aObserver)
   215 : CUnitTest(KDiscovererCompleteNotificationProcessingUnitTest, aDataLogger, aObserver)
   216 	{
   217 	//Do nothing
   218 	}
   219 
   220 
   221 // ______________________________________________________________________________
   222 //
   223 _LIT(KDiscovererNotificationUnitTest,"CDiscoverer_Notification_UnitTest");
   224 
   225 inline TInt CDiscoverer_Notification_UnitTest::RunError(TInt aError)
   226 	{
   227 	// The RunL left so chain to the base first and then cleanup
   228 	TInt error = CUnitTest::RunError(aError);	// Chain to base
   229 	delete iUTContext;
   230 	delete iStateAccessor;
   231 	/* delete any validators used */
   232 	delete iCtorValidator;
   233 	delete iNotificationValidator;
   234 	delete iDtorValidator;
   235 	return error;
   236 	}
   237 
   238 inline CDiscoverer_Notification_UnitTest::~CDiscoverer_Notification_UnitTest()
   239 	{
   240 	// Simply delete our test class instance
   241 	delete iUTContext;
   242 	delete iStateAccessor;
   243 	delete iCtorValidator;
   244 	delete iNotificationValidator;
   245 	delete iDtorValidator;
   246 	}
   247 
   248 inline CDiscoverer_Notification_UnitTest::CDiscoverer_Notification_UnitTest(CDataLogger& aDataLogger,
   249 																	MUnitTestObserver& aObserver)
   250 : CUnitTest(KDiscovererNotificationUnitTest, aDataLogger, aObserver)
   251 	{
   252 	//Do nothing
   253 	}
   254 
   255 // ______________________________________________________________________________
   256 //
   257 _LIT(KDiscovererResumeUnitTest,"CDiscoverer_SuspendResume_UnitTest");
   258 
   259 inline TInt CDiscoverer_SuspendResume_UnitTest::RunError(TInt aError)
   260 	{
   261 	// The RunL left so chain to the base first and then cleanup
   262 	TInt error = CUnitTest::RunError(aError);	// Chain to base
   263 	delete iUTContext;
   264 	delete iStateAccessor;
   265 	/* delete any validators used */
   266 	delete iCtorValidator;
   267 	delete iNotificationValidator;
   268 	delete iSuspendValidator;
   269 	delete iResumeValidator;
   270 	delete iDtorValidator;
   271 	return error;
   272 	}
   273 
   274 inline CDiscoverer_SuspendResume_UnitTest::~CDiscoverer_SuspendResume_UnitTest()
   275 	{
   276 	// Simply delete our test class instance
   277 	delete iUTContext;
   278 	delete iStateAccessor;
   279 	delete iCtorValidator;
   280 	delete iNotificationValidator;
   281 	delete iSuspendValidator;
   282 	delete iResumeValidator;
   283 	delete iDtorValidator;
   284 	}
   285 
   286 inline CDiscoverer_SuspendResume_UnitTest::CDiscoverer_SuspendResume_UnitTest(CDataLogger& aDataLogger,
   287 																	MUnitTestObserver& aObserver)
   288 : CUnitTest(KDiscovererResumeUnitTest, aDataLogger, aObserver)
   289 	{
   290 	//Do nothing
   291 	}
   292 
   293 // ______________________________________________________________________________
   294 //
   295 _LIT(KDiscovererScanDirectoryUnitTest,"CDiscoverer_ScanDirectory_UnitTest");
   296 
   297 inline TInt CDiscoverer_ScanDirectory_UnitTest::RunError(TInt aError)
   298 	{
   299 	// The RunL left so chain to the base first and then cleanup
   300 	TInt error = CUnitTest::RunError(aError);	// Chain to base
   301 	delete iUTContext;
   302 	delete iStateAccessor;
   303 	/* delete any validators used */
   304 	delete iCtorValidator;
   305 	delete iScanDirectoryValidator;
   306 	delete iDtorValidator;
   307 	return error;
   308 	}
   309 
   310 inline CDiscoverer_ScanDirectory_UnitTest::~CDiscoverer_ScanDirectory_UnitTest()
   311 	{
   312 	// Simply delete our test class instance
   313 	delete iUTContext;
   314 	delete iStateAccessor;
   315 	delete iCtorValidator;
   316 	delete iScanDirectoryValidator;
   317 	delete iDtorValidator;
   318 	}
   319 
   320 inline CDiscoverer_ScanDirectory_UnitTest::CDiscoverer_ScanDirectory_UnitTest(CDataLogger& aDataLogger,
   321 																	MUnitTestObserver& aObserver)
   322 : CUnitTest(KDiscovererScanDirectoryUnitTest, aDataLogger, aObserver)
   323 	{
   324 	//Do nothing
   325 	}
   326 
   327 // ______________________________________________________________________________
   328 //
   329 _LIT(KDiscovererScanDirectoryCancelUnitTest,"CDiscoverer_ScanDirectoryCancel_UnitTest");
   330 
   331 inline TInt CDiscoverer_ScanDirectoryCancel_UnitTest::RunError(TInt aError)
   332 	{
   333 	// The RunL left so chain to the base first and then cleanup
   334 	TInt error = CUnitTest::RunError(aError);	// Chain to base
   335 	delete iUTContext;
   336 	delete iStateAccessor;
   337 	/* delete any validators used */
   338 	delete iCtorValidator;
   339 	delete iScanDirectoryCancelValidator;
   340 	delete iDtorValidator;
   341 	return error;
   342 	}
   343 
   344 inline CDiscoverer_ScanDirectoryCancel_UnitTest::~CDiscoverer_ScanDirectoryCancel_UnitTest()
   345 	{
   346 	// Simply delete our test class instance
   347 	delete iUTContext;
   348 	delete iStateAccessor;
   349 	delete iCtorValidator;
   350 	delete iScanDirectoryCancelValidator;
   351 	delete iDtorValidator;
   352 	}
   353 
   354 inline CDiscoverer_ScanDirectoryCancel_UnitTest::CDiscoverer_ScanDirectoryCancel_UnitTest(CDataLogger& aDataLogger,
   355 																	MUnitTestObserver& aObserver)
   356 : CUnitTest(KDiscovererScanDirectoryCancelUnitTest, aDataLogger, aObserver)
   357 	{
   358 	//Do nothing
   359 	}
   360 
   361 // ______________________________________________________________________________
   362 //
   363 _LIT(KDiscovererScanDirectoryIncrementUnitTest,"CDiscoverer_ScanDirectoryIncrement_UnitTest");
   364 
   365 inline TInt CDiscoverer_ScanDirectoryIncrement_UnitTest::RunError(TInt aError)
   366 	{
   367 	// The RunL left so chain to the base first and then cleanup
   368 	TInt error = CUnitTest::RunError(aError);	// Chain to base
   369 	delete iUTContext;
   370 	delete iStateAccessor;
   371 	/* delete any validators used */
   372 	delete iCtorValidator;
   373 	delete iScanDirectoryIncrementValidator;
   374 	delete iDtorValidator;
   375 	return error;
   376 	}
   377 
   378 inline CDiscoverer_ScanDirectoryIncrement_UnitTest::~CDiscoverer_ScanDirectoryIncrement_UnitTest()
   379 	{
   380 	// Simply delete our test class instance
   381 	delete iUTContext;
   382 	delete iStateAccessor;
   383 	delete iCtorValidator;
   384 	delete iScanDirectoryIncrementValidator;
   385 	delete iDtorValidator;
   386 	}
   387 
   388 inline CDiscoverer_ScanDirectoryIncrement_UnitTest::CDiscoverer_ScanDirectoryIncrement_UnitTest(CDataLogger& aDataLogger,
   389 																	MUnitTestObserver& aObserver)
   390 : CUnitTest(KDiscovererScanDirectoryIncrementUnitTest, aDataLogger, aObserver)
   391 	{
   392 	//Do nothing
   393 	}