commsprocess/commsrootserverconfig/Te_Configurator/src/loadcpmStep.cpp
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     1 // Copyright (c) 2005-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 // Example CTestStep derived implementation
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file loadcpmStep.cpp
       
    20 */
       
    21 #include "loadcpmStep.h"
       
    22 #include "Te_ConfiguratorSuiteDefs.h"
       
    23 #include "Te_ConfiguratorSuiteServer.h"
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 //NET-CONFIGURATOR-I-0001-HP
       
    29 //Loading a CPM in configurator with OnDemand option 1
       
    30 /**
       
    31  * Destructor
       
    32  */
       
    33 CLoadCpm::~CLoadCpm()
       
    34 	{
       
    35 	}
       
    36 
       
    37 /**
       
    38  * Constructor
       
    39  */
       
    40 CLoadCpm::CLoadCpm()
       
    41 	{
       
    42 	SetTestStepName(KLoadCpm);
       
    43 	}
       
    44 /**
       
    45  * @see LoadCpm test case NET-CONFIGURATOR-I-0001-HP
       
    46  *
       
    47  * doTestStepL virtual function does the below action
       
    48  * Connect to a configurator
       
    49  * Configurator Loads the DummyCpm CPM (Communication provider module)
       
    50  * Configurator to unload the DummyCpm
       
    51  * close the connection to configuator
       
    52  * Expected:-LoadCpm return kerrNone
       
    53 */
       
    54 TVerdict CLoadCpm::doTestStepL()
       
    55 	{
       
    56 	SetTestStepResult(EFail);
       
    57     _LIT8(KNameDummyCpm,"DummyCpm");
       
    58 
       
    59 	//Configurator Load the DummyCpm CPM
       
    60 	iConfigurator.LoadCpm(KNameDummyCpm(),iStatus);
       
    61 	User::WaitForRequest(iStatus);
       
    62 	if(iStatus.Int() == KErrNone)
       
    63 		{
       
    64 		INFO_PRINTF1(_L("DummCpm Loaded Successfully \n"));
       
    65 		SetTestStepResult(EPass);
       
    66 		}
       
    67 	else if(iStatus.Int() == KErrRSModuleUnknown)
       
    68 		{
       
    69 		INFO_PRINTF2(_L("LoadCpm (DummyCpm) returned KErrRSModuleUnknown(%d)  \n"), iStatus.Int());
       
    70 		}
       
    71 	else if(iStatus.Int() == KErrRSModuleAlreadyExist )
       
    72 		{
       
    73 		INFO_PRINTF2(_L("LoadCpm Loaded more than one returned KErrRSModuleAlreadyExist (%d)  \n"), iStatus.Int());
       
    74 		}
       
    75 	else
       
    76 		{
       
    77 		INFO_PRINTF2(_L("LoadCpm (DummyCpm) returned Error (%d)  \n"), iStatus.Int());
       
    78 		}
       
    79 
       
    80 	iConfigurator.UnloadCpm(KNameDummyCpm(), EImmediate, iStatus);
       
    81 	//Waits for a specific asynchronous request to complete.
       
    82 	User::WaitForRequest(iStatus);
       
    83 
       
    84 	if(iStatus.Int() != KErrNone && iStatus.Int() != KErrCancel)
       
    85 		{
       
    86 		INFO_PRINTF1(_L("DummyCpm is not UnLoaded Successfully \n"));
       
    87 		SetTestStepResult(EFail);
       
    88 		}
       
    89 	return TestStepResult();
       
    90 	}
       
    91 
       
    92 //NET-CONFIGURATOR-I-0002-HP
       
    93 //Loading CPM More Than one time in a Configurator
       
    94 /**
       
    95  * Destructor
       
    96  */
       
    97 CLoadCpmMorethanOne::~CLoadCpmMorethanOne()
       
    98 	{
       
    99 	}
       
   100 
       
   101 /**
       
   102  * Constructor
       
   103  */
       
   104 CLoadCpmMorethanOne::CLoadCpmMorethanOne()
       
   105 	{
       
   106 	SetTestStepName(KLoadCpmMorethanOne);
       
   107 	}
       
   108 /**
       
   109  * @see LoadCpmMoreThanOne test case NET-CONFIGURATOR-I-0002-HP
       
   110  *
       
   111  * doTestStepL virtual function does the below action
       
   112  * Connect to a configurator
       
   113  * Configurator Loads the DummyCpm CPM (Communication provider module)
       
   114  * Configurator Loads the DummyCpm CPM
       
   115  * Configurator to unload the DummyCpm
       
   116  * close the connection to configuator
       
   117  * Expected:-LoadCpmMoreThanOne return KErrRSModuleAlreadyExist
       
   118 */
       
   119 TVerdict CLoadCpmMorethanOne::doTestStepL()
       
   120 	{
       
   121 
       
   122 	SetTestStepResult(EFail);
       
   123 	_LIT8(KNameDummyCpm,"DummyCpm");
       
   124 
       
   125 	//Configurator Load the dummycpm CPM
       
   126 	iConfigurator.LoadCpm(KNameDummyCpm(), iStatus);
       
   127 
       
   128 	//Waits for a specific asynchronous request to complete.
       
   129 	User::WaitForRequest(iStatus);
       
   130 
       
   131 	if(iStatus.Int() == KErrNone)
       
   132 		{
       
   133 		INFO_PRINTF1(_L("DummyCpm Loaded Successfully \n"));
       
   134 		}
       
   135 	else if(iStatus.Int() == KErrRSModuleUnknown)
       
   136 		{
       
   137 		INFO_PRINTF2(_L("LoadCpm (DummyCpm) returned KErrRSModuleUnknown(%d)  \n"), iStatus.Int());
       
   138 		}
       
   139 	else
       
   140 		{
       
   141 		INFO_PRINTF2(_L("LoadCpm (DummyCpm) returned Error (%d)  \n"), iStatus.Int());
       
   142 		}
       
   143 
       
   144 	//Configurator Load the dummycpm CPM
       
   145 	iConfigurator.LoadCpm(KNameDummyCpm(), iStatus);
       
   146 
       
   147 	//Waits for a specific asynchronous request to complete.
       
   148 	User::WaitForRequest(iStatus);
       
   149 
       
   150 	if(iStatus.Int() == KErrNone)
       
   151 		{
       
   152 		INFO_PRINTF1(_L("DummyCpm Loaded more than one Successfully \n"));
       
   153 		}
       
   154 	else if(iStatus.Int() == KErrRSModuleUnknown)
       
   155 		{
       
   156 		INFO_PRINTF2(_L("DummyCpm Loaded more than one returned KErrRSModuleUnknown(%d)  \n"), iStatus.Int());
       
   157 		}
       
   158 	else if(iStatus.Int() == KErrRSModuleAlreadyExist )
       
   159 		{
       
   160 		INFO_PRINTF2(_L("DummyCpm Loaded more than one returned KErrRSModuleAlreadyExist (%d)  \n"), iStatus.Int());
       
   161 		SetTestStepResult(EPass);
       
   162 		}
       
   163 	else
       
   164 		{
       
   165 		INFO_PRINTF2(_L("DummyCpm Loaded more than one returned Error (%d)  \n"), iStatus.Int());
       
   166 		}
       
   167 
       
   168 	//Configurator to unload the DummyCpm CPM
       
   169 	iConfigurator.UnloadCpm(KNameDummyCpm(), EImmediate, iStatus);
       
   170 
       
   171 	//Waits for a specific asynchronous request to complete.
       
   172 	User::WaitForRequest(iStatus);
       
   173 
       
   174 	if(iStatus.Int() != KErrNone)
       
   175 		{
       
   176 		INFO_PRINTF1(_L("DummyCpm is not UnLoaded Successfully \n"));
       
   177 		SetTestStepResult(EFail);
       
   178 		}
       
   179 	return TestStepResult();
       
   180 	}
       
   181 
       
   182 //NET-CONFIGURATOR-I-0003-HP
       
   183 //Loading a CPM in configurator on Boot time
       
   184 
       
   185 /**
       
   186  * Destructor
       
   187  */
       
   188 CLoadCpmBootTime::~CLoadCpmBootTime()
       
   189 	{
       
   190 	}
       
   191 
       
   192 /**
       
   193  * Constructor
       
   194  */
       
   195 CLoadCpmBootTime::CLoadCpmBootTime()
       
   196 	{
       
   197 	SetTestStepName(KLoadCpmBootTime);
       
   198 	}
       
   199 /**
       
   200  * @see LoadCpmBootTime test case NET-CONFIGURATOR-I-0003-HP
       
   201  *
       
   202  * doTestStepL virtual function does the below action
       
   203  * Connect to a configurator
       
   204  * Configurator Loads the DummyCpm CPM
       
   205  * Configurator to unload the DummyCpm
       
   206  * close the connection to configuator
       
   207  * Expected:-LoadCpmBootTime return KErrRSModuleAlreadyExist
       
   208 */
       
   209 TVerdict CLoadCpmBootTime::doTestStepL()
       
   210 	{
       
   211 
       
   212 	SetTestStepResult(EFail);
       
   213 	INFO_PRINTF1(_L("Configurator Connection Sucessful"));
       
   214     _LIT8(KNameDummyCpm8,"DummyCpm8");
       
   215 
       
   216 	//Configurator Load the DummyCpm CPM
       
   217 	iConfigurator.LoadCpm(KNameDummyCpm8(), iStatus);
       
   218 
       
   219 	//Waits for a specific asynchronous request to complete.
       
   220 	User::WaitForRequest(iStatus);
       
   221 
       
   222 	if(iStatus.Int() == KErrNone)
       
   223 		{
       
   224 		INFO_PRINTF1(_L("DummyCpm8 is not Loaded during boot time \n"));
       
   225 		}
       
   226 	else if(iStatus.Int() == KErrRSModuleUnknown)
       
   227 		{
       
   228 		INFO_PRINTF2(_L("LoadCpm during boot time returned KErrRSModuleUnknown(%d)  \n"), iStatus.Int());
       
   229 		}
       
   230 	else
       
   231 	if(iStatus.Int() == KErrRSModuleAlreadyExist)
       
   232 		{
       
   233 		INFO_PRINTF2(_L("LoadCpm returned KErrRSModuleAlreadyExist(%d)  \n"), iStatus.Int());
       
   234     	SetTestStepResult(EPass);
       
   235 		}
       
   236 	else
       
   237 		{
       
   238 		INFO_PRINTF2(_L("LoadCpm returned Error (%d)  \n"), iStatus.Int());
       
   239 		}
       
   240 
       
   241 	return TestStepResult();
       
   242 	}
       
   243 
       
   244 //NET-CONFIGURATOR-I-0004-HP
       
   245 //Loading CPM in a Configurator Without CMI files
       
   246 /**
       
   247  * Destructor
       
   248  */
       
   249 CLoadCpmWithoutCMI::~CLoadCpmWithoutCMI()
       
   250 	{
       
   251 	}
       
   252 
       
   253 /**
       
   254  * Constructor
       
   255  */
       
   256 CLoadCpmWithoutCMI::CLoadCpmWithoutCMI()
       
   257 	{
       
   258 	SetTestStepName(KLoadCpmWithoutCMI);
       
   259 	}
       
   260 /**
       
   261  * @see LoadCpmWithoutCMI test case NET-CONFIGURATOR-I-0004-HP
       
   262  *
       
   263  * doTestStepL virtual function does the below action
       
   264  * Connect to a configurator
       
   265  * Configurator Loads the Test_NoCmi CPM (Communication provider module)
       
   266  * close the connection to configuator
       
   267  * Expected:-LoadCpm return KErrRSModuleUnknown
       
   268 */
       
   269 TVerdict CLoadCpmWithoutCMI::doTestStepL()
       
   270 	{
       
   271 
       
   272 	SetTestStepResult(EFail);
       
   273 
       
   274 	//Connection to the configurator
       
   275 	_LIT8(KNameDummyNoCmi,"DummyNoCMI");
       
   276 
       
   277 	//Configurator Load the dummycpm
       
   278 	iConfigurator.LoadCpm(KNameDummyNoCmi(), iStatus);
       
   279 
       
   280 	//Waits for a specific asynchronous request to complete.
       
   281 	User::WaitForRequest(iStatus);
       
   282 	if(iStatus.Int() == KErrNone)
       
   283 		{
       
   284 	    INFO_PRINTF2(_L("LoadCpmWithoutCMI returned KErrNone (%d) - Expected KErrRSModuleUnknown  \n"), iStatus.Int());
       
   285 		}
       
   286 	else if(iStatus.Int() == KErrRSModuleAlreadyExist)
       
   287 		{
       
   288 		INFO_PRINTF2(_L("DummyCpm (ENewHeap) Cpm returned KErrRSModuleAlreadyExist(%d)  \n"), iStatus.Int());
       
   289 		}
       
   290 	if(iStatus.Int() == KErrRSModuleUnknown)
       
   291 		{
       
   292 		INFO_PRINTF2(_L("LoadCpmWithoutCMI returned KErrRSModuleUnknown (%d)  \n"), iStatus.Int());
       
   293 		SetTestStepResult(EPass);
       
   294 		}
       
   295 	else
       
   296 		{
       
   297 		INFO_PRINTF2(_L("LoadCpmWithoutCMI returned Error (%d)  \n"), iStatus.Int());
       
   298 		}
       
   299 	return TestStepResult();
       
   300 	}
       
   301 
       
   302 //NET-CONFIGURATOR-I-0005-HP
       
   303 //Loading a CPM which has different heap option
       
   304 /**
       
   305  * Destructor
       
   306  */
       
   307 CLoadCpmWithDiffHeapOption::~CLoadCpmWithDiffHeapOption()
       
   308 	{
       
   309 	}
       
   310 
       
   311 /**
       
   312  * Constructor
       
   313  */
       
   314 CLoadCpmWithDiffHeapOption::CLoadCpmWithDiffHeapOption()
       
   315 	{
       
   316 	SetTestStepName(KLoadCpmWithDiffHeapOption);
       
   317 	}
       
   318 /**
       
   319  * @see LoadCpmWithDiffHeapOption test case NET-CONFIGURATOR-I-0005-HP
       
   320  *
       
   321  * doTestStepL virtual function does the below action
       
   322  * Connect to a configurator
       
   323  * Configurator Loads the CPMs (Communication provider module)
       
   324  * Configurator to unload the CPMs
       
   325  * close the connection to configuator
       
   326  * Expected:-LoadCpmWithDiffHeapOption return KerrNone
       
   327 */
       
   328 TVerdict CLoadCpmWithDiffHeapOption::doTestStepL()
       
   329 	{
       
   330 
       
   331 	SetTestStepResult(EFail);
       
   332 	TRequestStatus status2, status3;
       
   333 	
       
   334 	_LIT8(KNameDummyCpm,"DummyCpm");
       
   335 	_LIT8(KNameDummyCpm2,"DummyCpm2");
       
   336 	_LIT8(KNameDummyCpm3,"DummyCpm3");
       
   337 
       
   338 	//Configurator Load the DummyCpm CPM
       
   339 	iConfigurator.LoadCpm(KNameDummyCpm(), iStatus);
       
   340 	//Waits for a specific asynchronous request to complete.
       
   341 	User::WaitForRequest(iStatus);
       
   342 	if(iStatus.Int() == KErrNone)
       
   343 		{
       
   344 		INFO_PRINTF1(_L("DummyCpm (ENewHeap) Cpm Loaded Successfully \n"));
       
   345 		}
       
   346 	else if(iStatus == KErrRSModuleAlreadyExist)
       
   347 		{
       
   348 		INFO_PRINTF2(_L("DummyCpm (ENewHeap) Cpm returned KErrRSModuleAlreadyExist(%d)  \n"), iStatus.Int());
       
   349 		}
       
   350 	else
       
   351 	if(iStatus.Int() == KErrRSModuleUnknown)
       
   352 		{
       
   353 		INFO_PRINTF2(_L("DummyCpm (ENewHeap) Cpm returned KErrRSModuleUnknown(%d)  \n"), iStatus.Int());
       
   354 		}
       
   355 	else
       
   356 		{
       
   357 		INFO_PRINTF2(_L("DummyCpm (ENewHeap) Cpm returned Error (%d)  \n"), iStatus.Int());
       
   358 		}
       
   359 
       
   360 	//Configurator Load the DummyCpm2 CPM
       
   361 	iConfigurator.LoadCpm(KNameDummyCpm2(), status2);
       
   362 	User::WaitForRequest(status2);
       
   363 	if(status2.Int() == KErrNone)
       
   364 		{
       
   365 		INFO_PRINTF1(_L("DummyCpm2 (EshareHeap) Cpm Loaded Successfully \n"));
       
   366 		}
       
   367 	else if(status2.Int() == KErrRSModuleAlreadyExist)
       
   368 		{
       
   369 		INFO_PRINTF2(_L("DummyCpm2 (EshareHeap) Cpm returned KErrRSModuleAlreadyExist(%d)  \n"), status2.Int());
       
   370 		}
       
   371 	else if(status2.Int() == KErrRSModuleUnknown)
       
   372 		{
       
   373 		INFO_PRINTF2(_L("DummyCpm2 (EshareHeap) Cpm returned KErrRSModuleUnknown(%d)  \n"), status2.Int());
       
   374 		}
       
   375 	else
       
   376 		{
       
   377 		INFO_PRINTF2(_L("DummyCpm2 (EshareHeap) Cpm returned Error (%d)  \n"), status2.Int());
       
   378 		}
       
   379 
       
   380 	//Configurator Load the DummyCpm3 CPM
       
   381 	iConfigurator.LoadCpm(KNameDummyCpm3(), status3);
       
   382 	//Waits for a specific asynchronous request to complete.
       
   383 	User::WaitForRequest(status3);
       
   384 	if(status3.Int() == KErrNone)
       
   385 		{
       
   386 		INFO_PRINTF1(_L("DummyCpm3 (EDefaultHeap) Cpm Loaded Successfully \n"));
       
   387 		}
       
   388 	else if(status3.Int() == KErrRSModuleUnknown)
       
   389 		{
       
   390 		INFO_PRINTF2(_L("DummyCpm3 (EDefaultHeap) Cpm returned KErrRSModuleUnknown(%d)  \n"), status3.Int());
       
   391 		}
       
   392 	else
       
   393 		{
       
   394 		INFO_PRINTF2(_L("DummyCpm3 (EDefaultHeap) Cpm returned Error (%d)  \n"), status3.Int());
       
   395 		}
       
   396 	if(iStatus.Int() == KErrNone && status2.Int() == KErrNone && status3.Int() == KErrNone )
       
   397 		{
       
   398 		INFO_PRINTF1(_L("DummyCpm (ENewHeap),DummyCpm2 (EshareHeap),DummyCpm3 (EDefaultHeap) are loading Successfully\n"));
       
   399 		SetTestStepResult(EPass);
       
   400 		}
       
   401 	else
       
   402 		{
       
   403 		SetTestStepResult(EFail);
       
   404 		}
       
   405 
       
   406 	//Configurator unload the  CPMs
       
   407 	iConfigurator.UnloadCpm(KNameDummyCpm(), EImmediate, iStatus);
       
   408 	User::WaitForRequest(iStatus);
       
   409 
       
   410 	iConfigurator.UnloadCpm(KNameDummyCpm2(), EImmediate, status2);
       
   411 	User::WaitForRequest(status2);
       
   412 
       
   413 	iConfigurator.UnloadCpm(KNameDummyCpm3(), EImmediate, status3);
       
   414 	User::WaitForRequest(status3);
       
   415 	return TestStepResult();
       
   416 	}
       
   417 
       
   418 //NET-CONFIGURATOR-I-0006-HP
       
   419 //Loading of CPM at the boot time
       
   420 /**
       
   421  * Destructor
       
   422  */
       
   423 CLoadOnDemandCpmBootTime::~CLoadOnDemandCpmBootTime()
       
   424 	{
       
   425 	}
       
   426 
       
   427 /**
       
   428  * Constructor
       
   429  */
       
   430 CLoadOnDemandCpmBootTime::CLoadOnDemandCpmBootTime()
       
   431 	{
       
   432 		SetTestStepName(KLoadOnDemandCpmBootTime);
       
   433 	}
       
   434 /**
       
   435  * @see LoadOnDemandCpmBootTime test case NET-CONFIGURATOR-I-0006-HP
       
   436  *
       
   437  * doTestStepL virtual function does the below action
       
   438  * Connect to a configurator
       
   439  * Configurator Loads the CPMs (Communication provider module)
       
   440  * Configurator to unload the DummyCpm
       
   441  * close the connection to configuator
       
   442  * Expected:-LoadOnDemandCpmBootTime return KErrNone
       
   443 */
       
   444 TVerdict CLoadOnDemandCpmBootTime::doTestStepL()
       
   445 	{
       
   446 
       
   447 	SetTestStepResult(EFail);
       
   448 	INFO_PRINTF1(_L("Configurator Connection Sucessful"));
       
   449 	_LIT8(KNameDummyCpm,"DummyCpm");
       
   450 	//Configurator Load the DummyCpm CPM
       
   451 	iConfigurator.LoadCpm(KNameDummyCpm(), iStatus);
       
   452 	//Waits for a specific asynchronous request to complete.
       
   453 	User::WaitForRequest(iStatus);
       
   454 	if(iStatus.Int() == KErrNone)
       
   455 		{
       
   456 		INFO_PRINTF1(_L("DummyCpm Loaded Sucessfully"));
       
   457 		SetTestStepResult(EPass);
       
   458 		}
       
   459 	else
       
   460 		{
       
   461 		INFO_PRINTF2(_L("DummyCpm Load Error %d"), iStatus.Int());
       
   462 		}
       
   463 
       
   464 	//Configurator to unload the DummyCpm CPM
       
   465 	iConfigurator.UnloadCpm(KNameDummyCpm(), EImmediate, iStatus);
       
   466 
       
   467 	//Waits for a specific asynchronous request to complete.
       
   468 	User::WaitForRequest(iStatus);
       
   469 
       
   470 	if(iStatus.Int() != KErrNone)
       
   471 		{
       
   472 		INFO_PRINTF1(_L("DummyCpm is not UnLoaded Successfully \n"));
       
   473 		SetTestStepResult(EFail);
       
   474 		}
       
   475 	return TestStepResult();
       
   476 
       
   477 	}
       
   478 
       
   479 //NET-CONFIGURATOR-I-0007-HP
       
   480 //Load same cpm with difference session simultaneously
       
   481 /**
       
   482  * Destructor
       
   483  */
       
   484 CLoadCpmDiffSession::~CLoadCpmDiffSession()
       
   485 	{
       
   486 	}
       
   487 
       
   488 /**
       
   489  * Constructor
       
   490  */
       
   491 CLoadCpmDiffSession::CLoadCpmDiffSession()
       
   492 	{
       
   493 	SetTestStepName(KLoadCpmDiffSession);
       
   494 	}
       
   495 /**
       
   496  * @see LoadCpmDiffSession test case NET-CONFIGURATOR-I-0007-HP
       
   497  *
       
   498  * doTestStepL virtual function does the below action
       
   499  * Connect to a configurator with two sessions
       
   500  * Configurator Loads the CPMs (Communication provider module)
       
   501  * Configurator to unload the DummyCpm2
       
   502  * close the connection to configuator
       
   503  * Expected:-LoadCpmDiffSession return KErrRSModuleAlreadyExist
       
   504 */
       
   505 TVerdict CLoadCpmDiffSession::doTestStepL()
       
   506 	{
       
   507 
       
   508 	SetTestStepResult(EFail);
       
   509 	TRequestStatus status1;
       
   510 	RRsConfigurator configurator1;
       
   511 	//Connection to the configurator
       
   512 	TInt result1 = configurator1.Connect();
       
   513 	if (result1 == KErrNone)
       
   514 		{
       
   515 		_LIT8(KNameDummyCpm,"DummyCpm");
       
   516 
       
   517 		iConfigurator.LoadCpm(KNameDummyCpm(),iStatus);
       
   518 		configurator1.LoadCpm(KNameDummyCpm(),status1);
       
   519 		User::WaitForRequest(iStatus, status1);
       
   520 
       
   521 		//Waits for a specific asynchronous request to complete
       
   522 		if(iStatus.Int() == KErrNone || status1.Int() == KErrRSModuleAlreadyExist)
       
   523 			{
       
   524 			INFO_PRINTF1(_L("Session1 loaded DummyCpm Successfully \n"));
       
   525 			SetTestStepResult(EPass);
       
   526 			}
       
   527 		else if(iStatus.Int() == KErrRSModuleAlreadyExist || status1.Int() == KErrNone)
       
   528 			{
       
   529 			INFO_PRINTF1(_L("Session2 loaded DummyCpm Successfully \n"));
       
   530 		    SetTestStepResult(EPass);
       
   531 			}
       
   532 		else if(iStatus.Int() == KErrRSModuleUnknown)
       
   533 			{
       
   534 			INFO_PRINTF2(_L("Configurator1 Session Cpm returned KErrRSModuleUnknown(%d)  \n"), iStatus.Int());
       
   535 			SetTestStepResult(EFail);
       
   536 			}
       
   537 		else if(status1.Int() == KErrRSModuleUnknown)
       
   538 			{
       
   539 			INFO_PRINTF2(_L("Configurator2 Session Cpm returned KErrRSModuleUnknown(%d)  \n"), status1.Int());
       
   540 			SetTestStepResult(EFail);
       
   541 			}
       
   542 		else
       
   543 			{
       
   544 			INFO_PRINTF1(_L("Unknown Error \n"));
       
   545 			SetTestStepResult(EFail);
       
   546 			}
       
   547 		
       
   548 		// Wait for the remaining request.
       
   549 		if(iStatus.Int() == KRequestPending)
       
   550 			{
       
   551 			User::WaitForRequest(iStatus);
       
   552 			}
       
   553 		else
       
   554 			{
       
   555 			User::WaitForRequest(status1);
       
   556 			}
       
   557 
       
   558 	  	if(iStatus.Int() == KErrNone)
       
   559 			{
       
   560 			//Configurator unload the DummyCpm
       
   561 			iConfigurator.UnloadCpm(KNameDummyCpm(), EImmediate, iStatus);
       
   562 			User::WaitForRequest(iStatus);
       
   563 			}
       
   564 		else if(status1.Int() == KErrNone)
       
   565 			{
       
   566 			//Configurator unload the DummyCpm
       
   567 			configurator1.UnloadCpm(KNameDummyCpm(), EImmediate, status1);
       
   568 			User::WaitForRequest(status1);
       
   569 			}
       
   570 
       
   571 		//Close to the configurator connection
       
   572 		configurator1.Close();
       
   573 		}
       
   574 	else
       
   575 		{
       
   576 		INFO_PRINTF1(_L("Configurator Connection Failure \n"));
       
   577 		}
       
   578 	return TestStepResult();
       
   579 	}
       
   580 
       
   581 //NET-CONFIGURATOR-I-0008-HP
       
   582 //Load all CPMs in a group where all modules are OnDemand
       
   583 /**
       
   584  * Destructor
       
   585  */
       
   586 CLoadallDemandCpm::~CLoadallDemandCpm()
       
   587 	{
       
   588 	}
       
   589 
       
   590 /**
       
   591  * Constructor
       
   592  */
       
   593 CLoadallDemandCpm::CLoadallDemandCpm()
       
   594 	{
       
   595 	SetTestStepName(KLoadallDemandCpm);
       
   596 	}
       
   597 /**
       
   598  * @see LoadallDemandCpm test case NET-CONFIGURATOR-I-0008-HP
       
   599  *
       
   600  * doTestStepL virtual function does the below action
       
   601  * Connect to a configurator with two sessions
       
   602  * Configurator Loads the onDemand CPMs (Communication provider module)
       
   603  * Configurator to unload the onDemand CPMs
       
   604  * close the connection to configuator
       
   605  * Expected:-LoadallDemandCpm return KErrNone
       
   606 */
       
   607 TVerdict CLoadallDemandCpm::doTestStepL()
       
   608 	{
       
   609 
       
   610 	SetTestStepResult(EFail);
       
   611 	TRequestStatus status5;
       
   612 
       
   613 	_LIT8(KNameDummyCpm4,"DummyCpm4");
       
   614 	_LIT8(KNameDummyCpm5,"DummyCpm5");
       
   615 
       
   616 	//Configurator Load the dummycpm4
       
   617 	iConfigurator.LoadCpm(KNameDummyCpm4(), iStatus);
       
   618 
       
   619 	//Waits for a specific asynchronous request to complete
       
   620 	User::WaitForRequest(iStatus);
       
   621 
       
   622 	if(iStatus.Int() == KErrNone)
       
   623 		{
       
   624 		INFO_PRINTF1(_L("DummyCpm4 Loaded Successfully \n"));
       
   625 	//	SetTestStepResult(EPass);
       
   626 		}
       
   627 	else if(iStatus == KErrRSModuleUnknown)
       
   628 		{
       
   629 		INFO_PRINTF2(_L("LoadCpm (DummyCpm4) returned KErrRSModuleUnknown(%d)  \n"), iStatus.Int());
       
   630 		SetTestStepResult(EFail);
       
   631 		}
       
   632 	else
       
   633 		{
       
   634 		INFO_PRINTF2(_L("LoadCpm (DummyCpm4) returned Error (%d)  \n"), iStatus.Int());
       
   635 		SetTestStepResult(EFail);
       
   636 		}
       
   637 	
       
   638 	//Configurator Load the dummycpm
       
   639 	iConfigurator.LoadCpm(KNameDummyCpm5(),status5);
       
   640 
       
   641 	//Waits for a specific asynchronous request to complete
       
   642 	User::WaitForRequest(status5);
       
   643 
       
   644 	if(status5.Int() == KErrNone)
       
   645 		{
       
   646 		INFO_PRINTF1(_L("DummyCpm5 Loaded Successfully \n"));
       
   647 	//	SetTestStepResult(EPass);
       
   648 		}
       
   649 	else if(status5 == KErrRSModuleUnknown)
       
   650 		{
       
   651 		INFO_PRINTF2(_L("LoadCpm (DummyCpm5) returned KErrRSModuleUnknown(%d)  \n"), status5.Int());
       
   652 		SetTestStepResult(EFail);
       
   653 		}
       
   654 	else
       
   655 		{
       
   656 		INFO_PRINTF2(_L("LoadCpm (DummyCpm5) returned Error (%d)  \n"), status5.Int());
       
   657 		SetTestStepResult(EFail);
       
   658 		}
       
   659 
       
   660 	if(status5.Int() == KErrNone && iStatus.Int() == KErrNone)
       
   661 		{
       
   662 		SetTestStepResult(EPass);
       
   663 		}
       
   664 	//Configurator unload the DummyCpm4
       
   665 	iConfigurator.UnloadCpm(KNameDummyCpm4(), EImmediate, iStatus);
       
   666 
       
   667 	//Waits for a specific asynchronous request to complete
       
   668 	User::WaitForRequest(iStatus);
       
   669 
       
   670 	//Configurator unload the DummyCpm5
       
   671 	iConfigurator.UnloadCpm(KNameDummyCpm5(), EImmediate, status5);
       
   672 
       
   673 	//Waits for a specific asynchronous request to complete
       
   674 	User::WaitForRequest(status5);
       
   675 
       
   676 	return TestStepResult();
       
   677 	}
       
   678 
       
   679 //NET-CONFIGURATOR-I-0009-HP
       
   680 //Load all CPMs in a group where all modules are OnDemand
       
   681 /**
       
   682  * Destructor
       
   683  */
       
   684 CLoadCpmGrpDiffSession::~CLoadCpmGrpDiffSession()
       
   685 	{
       
   686 	}
       
   687 
       
   688 /**
       
   689  * Constructor
       
   690  */
       
   691 CLoadCpmGrpDiffSession::CLoadCpmGrpDiffSession()
       
   692 	{
       
   693 	SetTestStepName(KLoadCpmGrpDiffSession);
       
   694 	}
       
   695 /**
       
   696  * @see LoadCpmGrpDiffSession test case NET-CONFIGURATOR-I-0009-HP
       
   697  *
       
   698  * doTestStepL virtual function does the below action
       
   699  * Connect to a configurator with two sessions
       
   700  * Configurator Loads the CPMs (Communication provider module)
       
   701  * Configurator to unload the onDemand CPMs
       
   702  * close the connection to configuator
       
   703  * Expected:-LoadCpmGrpDiffSession return KErrNone
       
   704 */
       
   705 TVerdict CLoadCpmGrpDiffSession::doTestStepL()
       
   706 	{
       
   707 
       
   708 	SetTestStepResult(EFail);
       
   709 	_LIT8(KNameDummyCpm4,"DummyCpm4");
       
   710 	_LIT8(KNameDummyCpm5,"DummyCpm5");
       
   711 	
       
   712 	//Configurator Load the dummycpm4 CPM
       
   713 	iConfigurator.LoadCpm(KNameDummyCpm4(), iStatus);
       
   714 
       
   715 	User::WaitForRequest(iStatus);
       
   716 	if(iStatus.Int() == KErrNone)
       
   717 		{
       
   718 		INFO_PRINTF1(_L("DummyCpm4 Loaded Successfully \n"));
       
   719 		}
       
   720 	else if(iStatus.Int() == KErrRSModuleUnknown)
       
   721 		{
       
   722 		INFO_PRINTF2(_L("DummyCpm4 returned KErrRSModuleUnknown(%d)  \n"), iStatus.Int());
       
   723 		SetTestStepResult(EFail);
       
   724 		}
       
   725 	else if(iStatus.Int() == KErrRSModuleAlreadyExist)
       
   726 		{
       
   727 		INFO_PRINTF2(_L("DummyCpm4 returned KErrRSModuleAlreadyExist(%d)  \n"), iStatus.Int());
       
   728 		SetTestStepResult(EFail);
       
   729 		}
       
   730 	else
       
   731 		{
       
   732 		INFO_PRINTF2(_L("DummyCpm4 returned Error (%d)  \n"), iStatus.Int());
       
   733 		SetTestStepResult(EFail);
       
   734 		}
       
   735 
       
   736 	//Connection to the configurator
       
   737 	RRsConfigurator configurator2;
       
   738 	TRequestStatus status2;
       
   739 	TInt result2 = configurator2.Connect();
       
   740 	if( result2 == KErrNone )
       
   741 		{
       
   742 		INFO_PRINTF1(_L("Configurator Connection Sucessful"));
       
   743 
       
   744 		//Configurator Load the dummycpm5 CPM
       
   745 		configurator2.LoadCpm(KNameDummyCpm5(), status2);
       
   746 		User::WaitForRequest(status2);
       
   747 		if(status2.Int() == KErrNone)
       
   748 			{
       
   749 			INFO_PRINTF1(_L("DummyCpm5 Loaded Successfully \n"));
       
   750 			}
       
   751 		else if(status2.Int() == KErrRSModuleUnknown)
       
   752 			{
       
   753 			INFO_PRINTF2(_L("DummyCpm5 returned KErrRSModuleUnknown(%d)  \n"), status2.Int());
       
   754 			SetTestStepResult(EFail);
       
   755 			}
       
   756 		else if(status2.Int() == KErrRSModuleAlreadyExist)
       
   757 			{
       
   758 			INFO_PRINTF2(_L("DummyCpm5 returned KErrRSModuleAlreadyExist(%d)  \n"), status2.Int());
       
   759 			SetTestStepResult(EFail);
       
   760 			}
       
   761 		else
       
   762 			{
       
   763 			INFO_PRINTF2(_L("DummyCpm5 returned Error (%d)  \n"), status2.Int());
       
   764 			SetTestStepResult(EFail);
       
   765 			}
       
   766 	    if((iStatus == KErrNone) && (status2 == KErrNone))
       
   767 			{
       
   768 			INFO_PRINTF1(_L("Configurator session load Sucessful"));
       
   769 			SetTestStepResult(EPass);
       
   770 			}
       
   771 		}
       
   772 	iConfigurator.UnloadCpm(KNameDummyCpm4(), EImmediate, iStatus);
       
   773 	User::WaitForRequest(iStatus);
       
   774 
       
   775 	//Configurator Unload the dummycpm5
       
   776 	configurator2.UnloadCpm(KNameDummyCpm5(), EImmediate, status2);
       
   777 	User::WaitForRequest(status2);
       
   778 
       
   779 	//Close  to the configurator 2nd session connection
       
   780 	configurator2.Close();
       
   781 
       
   782 	return TestStepResult();
       
   783 	}
       
   784 
       
   785 //NET-CONFIGURATOR-I-0010-HP
       
   786 //Loading CPM With corrupted CMI files. Missed some mandatory field
       
   787 
       
   788 /**
       
   789  * Destructor
       
   790  */
       
   791 CLoadCpmCorruptCMI::~CLoadCpmCorruptCMI()
       
   792 	{
       
   793 	}
       
   794 
       
   795 /**
       
   796  * Constructor
       
   797  */
       
   798 CLoadCpmCorruptCMI::CLoadCpmCorruptCMI()
       
   799 	{
       
   800 	SetTestStepName(KLoadCpmCorruptCMI);
       
   801 	}
       
   802 /**
       
   803  * @see LoadCpmCorruptCMI test case NET-CONFIGURATOR-I-0010-HP
       
   804  *
       
   805  * doTestStepL virtual function does the below action
       
   806  * Connect to a configurator server
       
   807  * Configurator Loads the CPM (Communication provider module)
       
   808  * Configurator to unload the onDemand CPM
       
   809  * close the connection to configuator
       
   810  * Expected:-LoadCpmCorruptCMI return KErrRSModuleUnknown
       
   811 */
       
   812 TVerdict CLoadCpmCorruptCMI::doTestStepL()
       
   813 	{
       
   814 
       
   815 	SetTestStepResult(EFail);
       
   816 	INFO_PRINTF1(_L("Configurator Connection Sucessful"));
       
   817 	_LIT8(KNameDummyCpm6,"DummyCpm6");
       
   818 
       
   819 	//Configurator Load the DummyCpm6 CPM
       
   820 	iConfigurator.LoadCpm(KNameDummyCpm6(), iStatus);
       
   821 
       
   822 	//Waits for a specific asynchronous request to complete.
       
   823 	User::WaitForRequest(iStatus);
       
   824 	if(iStatus.Int() == KErrNone)
       
   825 		{
       
   826 		INFO_PRINTF1(_L("DummyCpm6 Loaded Successfully \n"));
       
   827 		SetTestStepResult(EFail);
       
   828 		}
       
   829 	else if(iStatus.Int() == KErrRSModuleUnknown)
       
   830 		{
       
   831 		INFO_PRINTF2(_L("LoadCpm (DummyCpm6) returned KErrRSModuleUnknown(%d)  \n"), iStatus.Int());
       
   832 		SetTestStepResult(EPass);
       
   833 		}
       
   834 	else if(iStatus.Int() == KErrRSModuleAlreadyExist )
       
   835 		{
       
   836 		INFO_PRINTF2(_L("LoadCpm Loaded more than one returned KErrRSModuleAlreadyExist (%d)  \n"), iStatus.Int());
       
   837 		SetTestStepResult(EFail);
       
   838 		}
       
   839 	else
       
   840 		{
       
   841 		INFO_PRINTF2(_L("LoadCpm (DummyCpm6) returned Error (%d)  \n"), iStatus.Int());
       
   842 		SetTestStepResult(EFail);
       
   843 		}
       
   844 	return TestStepResult();
       
   845 	}
       
   846 
       
   847 //NET-CONFIGURATOR-I-0011-HP
       
   848 //Loading CPM in a Configurator With corrupted or broken CMI files ( fields with wrong spelling in Group as Groups)
       
   849 /**
       
   850  * Destructor
       
   851  */
       
   852 CLoadCpmBrokenCmi::~CLoadCpmBrokenCmi()
       
   853 	{
       
   854 	}
       
   855 
       
   856 /**
       
   857  * Constructor
       
   858  */
       
   859 CLoadCpmBrokenCmi::CLoadCpmBrokenCmi()
       
   860 	{
       
   861 
       
   862 	SetTestStepName(KLoadCpmBrokenCmi);
       
   863 
       
   864 	}
       
   865 /**
       
   866  * @see LoadCpmBrokenCmi test case NET-CONFIGURATOR-I-0011-HP
       
   867  *
       
   868  * doTestStepL virtual function does the below action
       
   869  * Connect to a configurator server
       
   870  * Configurator Loads the CPMs (Communication provider module)
       
   871  * close the connection to configuator
       
   872  * Expected:-LoadCpmBrokenCmi return KErrNone
       
   873 */
       
   874 TVerdict CLoadCpmBrokenCmi::doTestStepL()
       
   875 	{
       
   876 
       
   877 	SetTestStepResult(EFail);
       
   878     _LIT8(KNameDummyCpm7,"DummyCpm7");
       
   879 
       
   880 	//Configurator Load the DummyCpm7 CPM
       
   881 	iConfigurator.LoadCpm(KNameDummyCpm7(), iStatus);
       
   882 
       
   883 	//Waits for a specific asynchronous request to complete.
       
   884 	User::WaitForRequest(iStatus);
       
   885 	if(iStatus.Int() == KErrNone)
       
   886 		{
       
   887 		INFO_PRINTF1(_L("DummyCpm7 Loaded Successfully \n"));
       
   888 		SetTestStepResult(EPass);
       
   889 		}
       
   890 	else if(iStatus.Int() == KErrRSModuleUnknown)
       
   891 		{
       
   892 		INFO_PRINTF2(_L("LoadCpm (DummyCpm7) returned KErrRSModuleUnknown(%d)  \n"), iStatus.Int());
       
   893 		SetTestStepResult(EFail);
       
   894 		}
       
   895 	else if(iStatus.Int() == KErrRSModuleAlreadyExist )
       
   896 		{
       
   897 		INFO_PRINTF2(_L("LoadCpm Loaded more than one returned KErrRSModuleAlreadyExist (%d)  \n"), iStatus.Int());
       
   898 		SetTestStepResult(EFail);
       
   899 		}
       
   900 	else
       
   901 		{
       
   902 		INFO_PRINTF2(_L("LoadCpm (DummyCpm7) returned Error (%d)  \n"), iStatus.Int());
       
   903 		SetTestStepResult(EFail);
       
   904 		}
       
   905 	return TestStepResult();
       
   906 	}
       
   907 
       
   908 //NET-CONFIGURATOR-I-0012-HP
       
   909 //Loading CPM in a Configurator With corrupted or broken CMI files ( fields with wrong spelling OnDemand)
       
   910 /**
       
   911  * Destructor
       
   912  */
       
   913 CLoadCpmCorruptOnDemand::~CLoadCpmCorruptOnDemand()
       
   914 	{
       
   915 	}
       
   916 
       
   917 /**
       
   918  * Constructor
       
   919  */
       
   920 CLoadCpmCorruptOnDemand::CLoadCpmCorruptOnDemand()
       
   921 	{
       
   922 	SetTestStepName(KLoadCpmCorruptOnDemand);
       
   923 	}
       
   924 /**
       
   925  * @see LoadCpmCorruptOnDemand test case NET-CONFIGURATOR-I-0012-HP
       
   926  *
       
   927  * doTestStepL virtual function does the below action
       
   928  * Connect to a configurator server
       
   929  * Configurator Loads the CPMs (Communication provider module)
       
   930  * close the connection to configuator
       
   931  * Expected:-LoadCpmCorruptOnDemand return KErrNone
       
   932 */
       
   933 TVerdict CLoadCpmCorruptOnDemand::doTestStepL()
       
   934 	{
       
   935 
       
   936 	SetTestStepResult(EFail);
       
   937     _LIT8(KNameDummyCpm,"DummyCpm8");
       
   938 
       
   939 	//Configurator Load the DummyCpm8 CPM
       
   940 	iConfigurator.LoadCpm(KNameDummyCpm(), iStatus);
       
   941 
       
   942 	//Waits for a specific asynchronous request to complete.
       
   943 	User::WaitForRequest(iStatus);
       
   944 	if(iStatus == KErrNone)
       
   945 		{
       
   946 		INFO_PRINTF1(_L("DummyCpm8 Loaded Successfully \n"));
       
   947 		}
       
   948 	else
       
   949 	if(iStatus.Int() == KErrRSModuleUnknown)
       
   950 		{
       
   951 		INFO_PRINTF2(_L("LoadCpm (DummyCpm8) returned KErrRSModuleUnknown(%d)  \n"), iStatus.Int());
       
   952 		SetTestStepResult(EFail);
       
   953 		}
       
   954 	else
       
   955 	if(iStatus.Int() == KErrRSModuleAlreadyExist )
       
   956 		{
       
   957 		INFO_PRINTF2(_L("LoadCpm Loaded more than one returned KErrRSModuleAlreadyExist (%d)  \n"), iStatus.Int());
       
   958 		SetTestStepResult(EPass);
       
   959 		}
       
   960 	else
       
   961 		{
       
   962 		INFO_PRINTF2(_L("LoadCpm (DummyCpm8) returned Error (%d)  \n"), iStatus.Int());
       
   963 		SetTestStepResult(EFail);
       
   964 		}
       
   965 
       
   966 	//Configurator to unload the DummyCpm8 CPM
       
   967 	iConfigurator.UnloadCpm(KNameDummyCpm(), EImmediate, iStatus);
       
   968 
       
   969 	//Waits for a specific asynchronous request to complete.
       
   970 	User::WaitForRequest(iStatus);
       
   971 
       
   972 	if(iStatus.Int() != KErrNone)
       
   973 		{
       
   974 		INFO_PRINTF1(_L("DummyCpm is not UnLoaded Successfully \n"));
       
   975 		SetTestStepResult(EFail);
       
   976 		}
       
   977 	return TestStepResult();
       
   978 	}
       
   979 
       
   980 
       
   981 //NET-CONFIGURATOR-I-0035-HP
       
   982 //Loading CPM in a Configurator With corrupted or broken CMI files ( fields with wrong spelling OnDemand)
       
   983 /**
       
   984  * Destructor
       
   985  */
       
   986 CLoadCpmSameWorkerID::~CLoadCpmSameWorkerID()
       
   987 	{
       
   988 	}
       
   989 
       
   990 /**
       
   991  * Constructor
       
   992  */
       
   993 CLoadCpmSameWorkerID::CLoadCpmSameWorkerID()
       
   994 	{
       
   995 	SetTestStepName(KLoadCpmSameWorkerID);
       
   996 	}
       
   997 /**
       
   998  * @see LoadCpmSameWorkerID test case NET-CONFIGURATOR-I-0035-HP
       
   999  *
       
  1000  * doTestStepL virtual function does the below action
       
  1001  * Connect to a configurator server
       
  1002  * Configurator Loads the CPMs (Communication provider module)
       
  1003  * close the connection to configuator
       
  1004  * Expected:-LoadCpmCorruptOnDemand return KErrNone
       
  1005 */
       
  1006 TVerdict CLoadCpmSameWorkerID::doTestStepL()
       
  1007 	{
       
  1008 
       
  1009 	SetTestStepResult(EFail);
       
  1010 	TRequestStatus status2;
       
  1011     _LIT8(KNameDummyCpm15,"DummyCpm15");
       
  1012 
       
  1013 	//Configurator Load the DummyCpm15 CPM
       
  1014 	iConfigurator.LoadCpm(KNameDummyCpm15(), iStatus);
       
  1015 		//Waits for a specific asynchronous request to complete.
       
  1016 	User::WaitForRequest(iStatus);
       
  1017 	if(iStatus.Int() == KErrNone)
       
  1018 		{
       
  1019 		INFO_PRINTF1(_L("DummyCpm15 Loaded Successfully \n"));
       
  1020 		}
       
  1021 	else if(iStatus.Int() == KErrRSModuleUnknown)
       
  1022 		{
       
  1023 		INFO_PRINTF2(_L("LoadCpm (DummyCpm15) returned KErrRSModuleUnknown(%d)  \n"), iStatus.Int());
       
  1024 		SetTestStepResult(EFail);
       
  1025 		}
       
  1026 	else if(iStatus.Int() == KErrRSModuleAlreadyExist )
       
  1027 		{
       
  1028 		INFO_PRINTF2(_L("LoadCpm Loaded more than one returned KErrRSModuleAlreadyExist (%d)  \n"), iStatus.Int());
       
  1029 		SetTestStepResult(EFail);
       
  1030 		}
       
  1031 	else
       
  1032 		{
       
  1033 		INFO_PRINTF2(_L("LoadCpm (DummyCpm15) returned Error (%d)  \n"), iStatus.Int());
       
  1034 		SetTestStepResult(EFail);
       
  1035 		}
       
  1036 
       
  1037 	_LIT8(KNameDummyCpm16,"DummyCpm16");
       
  1038 
       
  1039 	//Configurator Load the DummyCpm16 CPM
       
  1040 	iConfigurator.LoadCpm(KNameDummyCpm16(),status2);
       
  1041 	//Waits for a specific asynchronous request to complete.
       
  1042 	User::WaitForRequest(status2);
       
  1043 	if(iStatus.Int() == KErrNone && status2.Int() == KErrNone)
       
  1044 		{
       
  1045 		INFO_PRINTF1(_L("DummyCpm15 and DummyCpm16 Loaded Successfully \n"));
       
  1046 		SetTestStepResult(EPass);
       
  1047 		}
       
  1048 	else if(status2.Int() == KErrRSModuleUnknown)
       
  1049 		{
       
  1050 		INFO_PRINTF2(_L("LoadCpm (DummyCpm16) returned KErrRSModuleUnknown(%d)  \n"), status2.Int());
       
  1051 		SetTestStepResult(EFail);
       
  1052 		}
       
  1053 	else
       
  1054 	if(status2.Int() == KErrRSModuleAlreadyExist )
       
  1055 		{
       
  1056 		INFO_PRINTF2(_L("LoadCpm Loaded more than one returned KErrRSModuleAlreadyExist (%d)  \n"), status2.Int());
       
  1057 		SetTestStepResult(EFail);
       
  1058 		}
       
  1059 	else
       
  1060 		{
       
  1061 		INFO_PRINTF2(_L("LoadCpm (DummyCpm16) returned Error (%d)  \n"), status2.Int());
       
  1062 		SetTestStepResult(EFail);
       
  1063 		}
       
  1064 
       
  1065 	//Configurator to unload the DummyCpm15 CPM
       
  1066 	iConfigurator.UnloadCpm(KNameDummyCpm15(), EImmediate, iStatus);
       
  1067 
       
  1068 	//Waits for a specific asynchronous request to complete.
       
  1069 	User::WaitForRequest(iStatus);
       
  1070 
       
  1071 	if(iStatus != KErrNone)
       
  1072 		{
       
  1073 		INFO_PRINTF1(_L("DummyCpm15 is not UnLoaded Successfully \n"));
       
  1074 		SetTestStepResult(EFail);
       
  1075 		}
       
  1076 
       
  1077 	//Configurator to unload the DummyCpm16 CPM
       
  1078 	iConfigurator.UnloadCpm(KNameDummyCpm16(), EImmediate, status2);
       
  1079 
       
  1080 	//Waits for a specific asynchronous request to complete.
       
  1081 	User::WaitForRequest(status2);
       
  1082 
       
  1083 	if(status2 != KErrNone)
       
  1084 		{
       
  1085 		INFO_PRINTF1(_L("DummyCpm16 is not UnLoaded Successfully \n"));
       
  1086 		SetTestStepResult(EFail);
       
  1087 		}
       
  1088 	return TestStepResult();
       
  1089 	}
       
  1090 
       
  1091 //NET-CONFIGURATOR-I-0001-HP
       
  1092 //Loading a CPM in configurator with OnDemand option 1, such that CPM fails to load
       
  1093 /**
       
  1094  * Destructor
       
  1095  */
       
  1096 CLoadCpmBindTimeOut::~CLoadCpmBindTimeOut()
       
  1097 	{
       
  1098 	}
       
  1099 
       
  1100 /**
       
  1101  * Constructor
       
  1102  */
       
  1103 CLoadCpmBindTimeOut::CLoadCpmBindTimeOut()
       
  1104 	{
       
  1105 	SetTestStepName(KLoadCpmBindTimeOut);
       
  1106 	}
       
  1107 /**
       
  1108  * @see LoadCpm test case NET-CONFIGURATOR-I-0001-HP
       
  1109  *
       
  1110  * doTestStepL virtual function does the below action
       
  1111  * Connect to a configurator
       
  1112  * Configurator Loads the DummyCpm CPM (Communication provider module)
       
  1113  * Configurator to unload the DummyCpm
       
  1114  * close the connection to configuator
       
  1115  * Expected:-LoadCpm return kerrNone
       
  1116 */
       
  1117 TVerdict CLoadCpmBindTimeOut::doTestStepL()
       
  1118 	{
       
  1119 	SetTestStepResult(EFail);
       
  1120     _LIT8(KNameDummyBF,"DummyBF");
       
  1121 
       
  1122 	iConfigurator.LoadCpm(KNameDummyBF(),iStatus);
       
  1123 	User::WaitForRequest(iStatus);
       
  1124 	if(iStatus.Int() == KErrRSRequestTimedOut)
       
  1125 		{
       
  1126 		INFO_PRINTF2(_L("DummCpm Load failed with (%d) Successfully \n"), iStatus.Int());
       
  1127 		SetTestStepResult(EPass);
       
  1128 		}
       
  1129 	else if(iStatus.Int() == KErrNone)
       
  1130 		{
       
  1131 		INFO_PRINTF2(_L("LoadCpm (DummyBF) returned KErrNone(%d)  \n"), iStatus.Int());
       
  1132 		}
       
  1133 	else if(iStatus.Int() == KErrRSModuleAlreadyExist )
       
  1134 		{
       
  1135 		INFO_PRINTF2(_L("LoadCpm Loaded more than one returned KErrRSModuleAlreadyExist (%d)  \n"), iStatus.Int());
       
  1136 		}
       
  1137 	else
       
  1138 		{
       
  1139 		INFO_PRINTF2(_L("LoadCpm (DummyBF) returned Error (%d)  \n"), iStatus.Int());
       
  1140 		}
       
  1141 
       
  1142 	return TestStepResult();
       
  1143 	}
       
  1144 
       
  1145 //NET-CONFIGURATOR-I-0001-HP
       
  1146 //Loading a CPM in configurator with OnDemand option 1, such that CPM fails to load
       
  1147 /**
       
  1148  * Destructor
       
  1149  */
       
  1150 CLoadOnDemandBootCPMFailToLoad::~CLoadOnDemandBootCPMFailToLoad()
       
  1151 	{
       
  1152 	}
       
  1153 
       
  1154 /**
       
  1155  * Constructor
       
  1156  */
       
  1157 CLoadOnDemandBootCPMFailToLoad::CLoadOnDemandBootCPMFailToLoad()
       
  1158 	{
       
  1159 	SetTestStepName(KLoadOnDemandBootCPMFailToLoad);
       
  1160 	}
       
  1161 /**
       
  1162  * @see LoadCpm test case NET-CONFIGURATOR-I-0001-HP
       
  1163  *
       
  1164  * doTestStepL virtual function does the below action
       
  1165  * Connect to a configurator
       
  1166  * Configurator Loads the DummyCpm CPM (Communication provider module)
       
  1167  * Configurator to unload the DummyCpm
       
  1168  * close the connection to configuator
       
  1169  * Expected:-LoadCpm return kerrNone
       
  1170 */
       
  1171 TVerdict CLoadOnDemandBootCPMFailToLoad::doTestStepL()
       
  1172 	{
       
  1173 	SetTestStepResult(EFail);
       
  1174     _LIT8(KDummyODBI,"DummyODBI");
       
  1175 
       
  1176 	iConfigurator.LoadCpm(KDummyODBI(),iStatus);
       
  1177 	User::WaitForRequest(iStatus);
       
  1178 	if(iStatus.Int() == KErrRSEitherModuleInBindingFailedToLoad)
       
  1179 		{
       
  1180 		INFO_PRINTF2(_L("DummyODBI Load failed with (%d) Successfully \n"), iStatus.Int());
       
  1181 		SetTestStepResult(EPass);
       
  1182 		}
       
  1183 	else if(iStatus.Int() == KErrNone)
       
  1184 		{
       
  1185 		INFO_PRINTF2(_L("LoadCpm (DummyODBI) returned KErrNone(%d)  \n"), iStatus.Int());
       
  1186 		}
       
  1187 	else if(iStatus.Int() == KErrRSModuleAlreadyExist )
       
  1188 		{
       
  1189 		INFO_PRINTF2(_L("LoadCpm Loaded more than one returned KErrRSModuleAlreadyExist (%d)  \n"), iStatus.Int());
       
  1190 		}
       
  1191 	else
       
  1192 		{
       
  1193 		INFO_PRINTF2(_L("LoadCpm (DummyODBI) returned Error (%d)  \n"), iStatus.Int());
       
  1194 		}
       
  1195 
       
  1196 	return TestStepResult();
       
  1197 	}
       
  1198 
       
  1199 
       
  1200 //NET-CONFIGURATOR-I-0001-HP
       
  1201 //Loading a CPM in configurator with OnDemand option 1, such that CPM fails to load
       
  1202 /**
       
  1203  * Destructor
       
  1204  */
       
  1205 COnDemandCPMFailToLoad::~COnDemandCPMFailToLoad()
       
  1206 	{
       
  1207 	}
       
  1208 
       
  1209 /**
       
  1210  * Constructor
       
  1211  */
       
  1212 COnDemandCPMFailToLoad::COnDemandCPMFailToLoad()
       
  1213 	{
       
  1214 	SetTestStepName(KOnDemandCPMFailToLoad);
       
  1215 	}
       
  1216 /**
       
  1217  * @see LoadCpm test case NET-CONFIGURATOR-I-0001-HP
       
  1218  *
       
  1219  * doTestStepL virtual function does the below action
       
  1220  * Connect to a configurator
       
  1221  * Configurator Loads the DummyCpm CPM (Communication provider module)
       
  1222  * Configurator to unload the DummyCpm
       
  1223  * close the connection to configuator
       
  1224  * Expected:-LoadCpm return kerrNone
       
  1225 */
       
  1226 TVerdict COnDemandCPMFailToLoad::doTestStepL()
       
  1227 	{
       
  1228 	SetTestStepResult(EFail);
       
  1229     _LIT8(KDummyLFODBI,"DummyLFODBI");
       
  1230 
       
  1231 	iConfigurator.LoadCpm(KDummyLFODBI(),iStatus);
       
  1232 	User::WaitForRequest(iStatus);
       
  1233 	if(iStatus.Int() == KErrGeneral)
       
  1234 		{
       
  1235 		INFO_PRINTF2(_L("DummyLFODBI Load failed with (%d) Successfully \n"), iStatus.Int());
       
  1236 		SetTestStepResult(EPass);
       
  1237 		}
       
  1238 	else if(iStatus.Int() == KErrNone)
       
  1239 		{
       
  1240 		INFO_PRINTF2(_L("LoadCpm (DummyLFODBI) returned KErrNone(%d)  \n"), iStatus.Int());
       
  1241 		}
       
  1242 	else if(iStatus.Int() == KErrRSModuleAlreadyExist )
       
  1243 		{
       
  1244 		INFO_PRINTF2(_L("LoadCpm Loaded more than one returned KErrRSModuleAlreadyExist (%d)  \n"), iStatus.Int());
       
  1245 		}
       
  1246 	else
       
  1247 		{
       
  1248 		INFO_PRINTF2(_L("LoadCpm (DummyLFODBI) returned Error (%d)  \n"), iStatus.Int());
       
  1249 		}
       
  1250 	return TestStepResult();
       
  1251 	}
       
  1252 
       
  1253 //NET-CONFIGURATOR-I-0001-HP
       
  1254 //Loading a CPM in configurator with OnDemand option 1, such that CPM fails to load
       
  1255 /**
       
  1256  * Destructor
       
  1257  */
       
  1258 COnDemandCPMFailToLoadBindingOrderChanged::~COnDemandCPMFailToLoadBindingOrderChanged()
       
  1259 	{
       
  1260 	}
       
  1261 
       
  1262 /**
       
  1263  * Constructor
       
  1264  */
       
  1265 COnDemandCPMFailToLoadBindingOrderChanged::COnDemandCPMFailToLoadBindingOrderChanged()
       
  1266 	{
       
  1267 	SetTestStepName(KOnDemandCPMFailToLoadBindingOrderChanged);
       
  1268 	}
       
  1269 /**
       
  1270  * @see LoadCpm test case NET-CONFIGURATOR-I-0001-HP
       
  1271  *
       
  1272  * doTestStepL virtual function does the below action
       
  1273  * Connect to a configurator
       
  1274  * Configurator Loads the DummyCpm CPM (Communication provider module)
       
  1275  * Configurator to unload the DummyCpm
       
  1276  * close the connection to configuator
       
  1277  * Expected:-LoadCpm return kerrNone
       
  1278 */
       
  1279 TVerdict COnDemandCPMFailToLoadBindingOrderChanged::doTestStepL()
       
  1280 	{
       
  1281 	SetTestStepResult(EFail);
       
  1282     _LIT8(KDummyLFODBIOC,"DummyLFODBIOC");
       
  1283 
       
  1284 	iConfigurator.LoadCpm(KDummyLFODBIOC(),iStatus);
       
  1285 	User::WaitForRequest(iStatus);
       
  1286 	if(iStatus.Int() == KErrGeneral)
       
  1287 		{
       
  1288 		INFO_PRINTF2(_L("DummyLFODBIOC Load failed with (%d) Successfully \n"), iStatus.Int());
       
  1289 		SetTestStepResult(EPass);
       
  1290 		}
       
  1291 	else if(iStatus.Int() == KErrNone)
       
  1292 		{
       
  1293 		INFO_PRINTF2(_L("LoadCpm (DummyLFODBIOC) returned KErrNone(%d)  \n"), iStatus.Int());
       
  1294 		}
       
  1295 	else if(iStatus.Int() == KErrRSModuleAlreadyExist )
       
  1296 		{
       
  1297 		INFO_PRINTF2(_L("LoadCpm Loaded more than one returned KErrRSModuleAlreadyExist (%d)  \n"), iStatus.Int());
       
  1298 		}
       
  1299 	else
       
  1300 		{
       
  1301 		INFO_PRINTF2(_L("LoadCpm (DummyLFODBIOC) returned Error (%d)  \n"), iStatus.Int());
       
  1302 		}
       
  1303 	return TestStepResult();
       
  1304 	}
       
  1305 
       
  1306 //NET-CONFIGURATOR-I-0001-HP
       
  1307 //Loading a CPM in configurator with OnDemand option 1, such that CPM fails to load
       
  1308 /**
       
  1309  * Destructor
       
  1310  */
       
  1311 CLoadOnDemandCPMOneofTwoBindingsFail::~CLoadOnDemandCPMOneofTwoBindingsFail()
       
  1312 	{
       
  1313 	}
       
  1314 
       
  1315 /**
       
  1316  * Constructor
       
  1317  */
       
  1318 CLoadOnDemandCPMOneofTwoBindingsFail::CLoadOnDemandCPMOneofTwoBindingsFail()
       
  1319 	{
       
  1320 	SetTestStepName(KLoadOnDemandBootCPMFailToLoad);
       
  1321 	}
       
  1322 /**
       
  1323  * @see LoadCpm test case NET-CONFIGURATOR-I-0001-HP
       
  1324  *
       
  1325  * doTestStepL virtual function does the below action
       
  1326  * Connect to a configurator
       
  1327  * Configurator Loads the DummyCpm CPM (Communication provider module)
       
  1328  * Configurator to unload the DummyCpm
       
  1329  * close the connection to configuator
       
  1330  * Expected:-LoadCpm return kerrNone
       
  1331 */
       
  1332 TVerdict CLoadOnDemandCPMOneofTwoBindingsFail::doTestStepL()
       
  1333 	{
       
  1334 	SetTestStepResult(EFail);
       
  1335     _LIT8(KDummyOD2B1MLF,"DummyOD2B1MLF");
       
  1336 
       
  1337 	iConfigurator.LoadCpm(KDummyOD2B1MLF(),iStatus);
       
  1338 	User::WaitForRequest(iStatus);
       
  1339 	if(iStatus.Int() == KErrNone)
       
  1340 		{
       
  1341 		INFO_PRINTF2(_L("DummyOD2B1MLF Load passed (%d) Successfully \n"), iStatus.Int());
       
  1342 		SetTestStepResult(EPass);
       
  1343 		}
       
  1344 	else if(iStatus.Int() == KErrNone)
       
  1345 		{
       
  1346 		INFO_PRINTF2(_L("LoadCpm (DummyOD2B1MLF) returned KErrNone(%d)  \n"), iStatus.Int());
       
  1347 		}
       
  1348 	else if(iStatus.Int() == KErrRSModuleAlreadyExist )
       
  1349 		{
       
  1350 		INFO_PRINTF2(_L("LoadCpm Loaded more than one returned KErrRSModuleAlreadyExist (%d)  \n"), iStatus.Int());
       
  1351 		}
       
  1352 	else
       
  1353 		{
       
  1354 		INFO_PRINTF2(_L("LoadCpm (DummyOD2B1MLF) returned Error (%d)  \n"), iStatus.Int());
       
  1355 		}
       
  1356 
       
  1357 	iConfigurator.UnloadCpm(KDummyOD2B1MLF(), EImmediate, iStatus);
       
  1358 	//Waits for a specific asynchronous request to complete.
       
  1359 	User::WaitForRequest(iStatus);
       
  1360 
       
  1361 	if(iStatus.Int() != KErrNone && iStatus.Int() != KErrCancel)
       
  1362 		{
       
  1363 		INFO_PRINTF1(_L("DummyOD2B1MLF is not UnLoaded Successfully \n"));
       
  1364 		SetTestStepResult(EFail);
       
  1365 		}
       
  1366 	return TestStepResult();
       
  1367 	}
       
  1368 
       
  1369 
       
  1370 
       
  1371