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