commsconfig/commsdatabaseshim/TE_commdb/src/Step_036_xx.cpp
changeset 72 ae47d0499bee
equal deleted inserted replaced
68:5da8188e392b 72:ae47d0499bee
       
     1 //
       
     2 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 // All rights reserved.
       
     4 // This component and the accompanying materials are made available
       
     5 // under the terms of "Eclipse Public License v1.0"
       
     6 // which accompanies this distribution, and is available
       
     7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 //
       
     9 // Initial Contributors:
       
    10 // Nokia Corporation - initial contribution.
       
    11 //
       
    12 // Contributors:
       
    13 //
       
    14 // Description:
       
    15 //
       
    16 //
       
    17 //
       
    18 // This contains CommDb Unit Test Cases 036.XX
       
    19 
       
    20 // EPOC includes
       
    21 #include <e32base.h>
       
    22 #include <commdb.h>
       
    23 #include <d32comm.h>
       
    24 #include <cdbtemp.h>
       
    25 #include <etelmm.h>
       
    26 
       
    27 // Test system includes
       
    28 #include "Teststepcommdb.h"
       
    29 #include "Step_036_xx.h"
       
    30 
       
    31 
       
    32 CCommDbTest036_01::CCommDbTest036_01()
       
    33 	{
       
    34 	// store the name of this test case
       
    35 	SetTestStepName(_L("step_036_01"));
       
    36 	}
       
    37 
       
    38 CCommDbTest036_01::~CCommDbTest036_01()
       
    39 	{}
       
    40 
       
    41 TVerdict CCommDbTest036_01::doTestStepL( void )
       
    42 	{
       
    43 	if(executeStepL()!=KErrNone)
       
    44          SetTestStepResult(EFail);        SetTestStepResult(EPass);	return TestStepResult();
       
    45 	}
       
    46 
       
    47 TVerdict CCommDbTest036_01::doTestStepPreambleL()
       
    48 	{
       
    49 	iTheDb=CCommsDatabase::NewL();
       
    50 
       
    51         SetTestStepResult(EPass);	return TestStepResult();
       
    52 	}
       
    53 
       
    54 TInt CCommDbTest036_01::executeStepL()
       
    55 	{
       
    56 	CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(MODEM_BEARER));
       
    57 	CleanupStack::PushL(templateRecord);
       
    58 	
       
    59 	User::LeaveIfError(templateRecord->Modify());
       
    60 
       
    61 	TBufC8<KCommsDbSvrMaxFieldLength> inputString = _L8("string");
       
    62 	templateRecord->WriteTextL(TPtrC(COMMDB_NAME), _L("DummyName"));
       
    63 	templateRecord->WriteTextL(TPtrC(MODEM_FAX_INIT_STRING), inputString);
       
    64 	User::LeaveIfError(templateRecord->StoreModifications());
       
    65 
       
    66 	CleanupStack::PopAndDestroy(templateRecord);
       
    67 
       
    68 	//Create a new template record and check the value is the same as the one entered.
       
    69 	CCommsDbTemplateRecord* checkRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(MODEM_BEARER));
       
    70 	CleanupStack::PushL(checkRecord);
       
    71 	
       
    72 	TBuf8<KCommsDbSvrMaxFieldLength> checkString;
       
    73 
       
    74 	checkRecord->ReadTextL(TPtrC(MODEM_FAX_INIT_STRING), checkString);
       
    75 	CleanupStack::PopAndDestroy(checkRecord);
       
    76 
       
    77 	if(checkString!=inputString)
       
    78 		return KErrGeneral;
       
    79 
       
    80 	return KErrNone;
       
    81 	}
       
    82 	
       
    83 TVerdict CCommDbTest036_01::doTestStepPostambleL()
       
    84 	{
       
    85 	delete iTheDb;
       
    86 	iTheDb=NULL;
       
    87         SetTestStepResult(EPass);	return TestStepResult();
       
    88 	}
       
    89 
       
    90 /////////////////////////////////////////////////////////////////////////
       
    91 
       
    92 CCommDbTest036_02::CCommDbTest036_02()
       
    93 	{
       
    94 	// store the name of this test case
       
    95 	SetTestStepName(_L("step_036_02"));
       
    96 	}
       
    97 
       
    98 CCommDbTest036_02::~CCommDbTest036_02()
       
    99 	{}
       
   100 
       
   101 TVerdict CCommDbTest036_02::doTestStepL( void )
       
   102 	{
       
   103 	if(executeStepL()!=KErrNone)
       
   104          SetTestStepResult(EFail);        SetTestStepResult(EPass);	return TestStepResult();
       
   105 	}
       
   106 
       
   107 TVerdict CCommDbTest036_02::doTestStepPreambleL()
       
   108 	{
       
   109 	iTheDb=CCommsDatabase::NewL();
       
   110 
       
   111         SetTestStepResult(EPass);	return TestStepResult();
       
   112 	}
       
   113 
       
   114 TInt CCommDbTest036_02::executeStepL()
       
   115 	{
       
   116 	CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(MODEM_BEARER));
       
   117 	CleanupStack::PushL(templateRecord);
       
   118 	
       
   119 	User::LeaveIfError(templateRecord->Modify());
       
   120 
       
   121 	TBufC8<KCommsDbSvrMaxFieldLength> firstInputString = _L8("string");
       
   122 	templateRecord->WriteTextL(TPtrC(COMMDB_NAME), _L("DummyName"));
       
   123 	templateRecord->WriteTextL(TPtrC(MODEM_FAX_INIT_STRING), firstInputString);
       
   124 	User::LeaveIfError(templateRecord->StoreModifications());
       
   125 
       
   126 	CleanupStack::PopAndDestroy(templateRecord);
       
   127 
       
   128 	//Create a view on the modem table, over write the template value previosly set and check it sticks
       
   129 
       
   130 	CCommsDbTableView* tableView = iTheDb->OpenTableLC(TPtrC(MODEM_BEARER));
       
   131 	TUint32 dummyId;
       
   132 	//Create a new record, so we can be sure it is the same as the templated one
       
   133 	User::LeaveIfError(tableView->InsertRecord(dummyId));
       
   134 	tableView->WriteTextL(TPtrC(COMMDB_NAME), _L("NewModem"));
       
   135 	//Do overwrite of setting
       
   136 	TBufC8<KCommsDbSvrMaxFieldLength> overwriteString = _L8("different string");
       
   137 	tableView->WriteTextL(TPtrC(MODEM_FAX_INIT_STRING), overwriteString);
       
   138 	User::LeaveIfError(tableView->PutRecordChanges());
       
   139 
       
   140 	TBuf8<KCommsDbSvrMaxFieldLength> retrievedString;
       
   141 	tableView->ReadTextL(TPtrC(MODEM_FAX_INIT_STRING), retrievedString);
       
   142 	CleanupStack::PopAndDestroy(tableView);
       
   143 
       
   144 	if(retrievedString!=overwriteString)
       
   145 		return KErrGeneral;
       
   146 
       
   147 	return KErrNone;
       
   148 	}
       
   149 	
       
   150 TVerdict CCommDbTest036_02::doTestStepPostambleL()
       
   151 	{
       
   152 	delete iTheDb;
       
   153 	iTheDb=NULL;
       
   154         SetTestStepResult(EPass);	return TestStepResult();
       
   155 	}
       
   156 
       
   157 /////////////////////////////////////////////////////////////////////////
       
   158 
       
   159 CCommDbTest036_03::CCommDbTest036_03()
       
   160 	{
       
   161 	// store the name of this test case
       
   162 	SetTestStepName(_L("step_036_03"));
       
   163 	}
       
   164 
       
   165 CCommDbTest036_03::~CCommDbTest036_03()
       
   166 	{}
       
   167 
       
   168 TVerdict CCommDbTest036_03::doTestStepL( void )
       
   169 	{
       
   170 	if(executeStepL()!=KErrNone)
       
   171          SetTestStepResult(EFail);        SetTestStepResult(EPass);	return TestStepResult();
       
   172 	}
       
   173 
       
   174 TVerdict CCommDbTest036_03::doTestStepPreambleL()
       
   175 	{
       
   176 	iTheDb=CCommsDatabase::NewL();
       
   177 
       
   178         SetTestStepResult(EPass);	return TestStepResult();
       
   179 	}
       
   180 
       
   181 TInt CCommDbTest036_03::executeStepL()
       
   182 	{
       
   183 	CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(MODEM_BEARER));
       
   184 	CleanupStack::PushL(templateRecord);
       
   185 	
       
   186 	User::LeaveIfError(templateRecord->Modify());
       
   187 
       
   188 	TBufC<KCommsDbSvrMaxFieldLength> inputString = _L("string");
       
   189 	templateRecord->WriteTextL(TPtrC(COMMDB_NAME), _L("DummyName"));
       
   190 	templateRecord->WriteTextL(TPtrC(MODEM_PORT_NAME), inputString);
       
   191 	User::LeaveIfError(templateRecord->StoreModifications());
       
   192 
       
   193 	CleanupStack::PopAndDestroy(templateRecord);
       
   194 
       
   195 	//Create a view on the modem table, make a new record and check the value is the one set for the template
       
   196 
       
   197 	CCommsDbTableView* tableView = iTheDb->OpenTableLC(TPtrC(MODEM_BEARER));
       
   198 	TUint32 dummyId;
       
   199 	//Create a new record, so we can be sure it is the same as the templated one
       
   200 	User::LeaveIfError(tableView->InsertRecord(dummyId));
       
   201 	tableView->WriteTextL(TPtrC(COMMDB_NAME), _L("NewModem"));
       
   202 	User::LeaveIfError(tableView->PutRecordChanges());
       
   203 
       
   204 	//Retrieve the string we set for the template
       
   205 	TBuf<KCommsDbSvrMaxFieldLength> retrievedString;
       
   206 	tableView->ReadTextL(TPtrC(MODEM_PORT_NAME), retrievedString);
       
   207 	CleanupStack::PopAndDestroy(tableView);
       
   208 
       
   209 	if(retrievedString!=inputString)
       
   210 		return KErrGeneral;
       
   211 
       
   212 	return KErrNone;
       
   213 	}
       
   214 	
       
   215 TVerdict CCommDbTest036_03::doTestStepPostambleL()
       
   216 	{
       
   217 	delete iTheDb;
       
   218 	iTheDb=NULL;
       
   219         SetTestStepResult(EPass);	return TestStepResult();
       
   220 	}
       
   221 
       
   222 /////////////////////////////////////////////////////////////////////////
       
   223 
       
   224 CCommDbTest036_04::CCommDbTest036_04()
       
   225 	{
       
   226 	// store the name of this test case
       
   227 	SetTestStepName(_L("step_036_04"));
       
   228 	}
       
   229 
       
   230 CCommDbTest036_04::~CCommDbTest036_04()
       
   231 	{}
       
   232 
       
   233 TVerdict CCommDbTest036_04::doTestStepL( void )
       
   234 	{
       
   235 	if(executeStepL()!=KErrNone)
       
   236          SetTestStepResult(EFail);        SetTestStepResult(EPass);	return TestStepResult();
       
   237 	}
       
   238 
       
   239 TVerdict CCommDbTest036_04::doTestStepPreambleL()
       
   240 	{
       
   241 	iTheDb=CCommsDatabase::NewL();
       
   242 
       
   243         SetTestStepResult(EPass);	return TestStepResult();
       
   244 	}
       
   245 
       
   246 TInt CCommDbTest036_04::executeStepL()
       
   247 	{
       
   248 	CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(MODEM_BEARER));
       
   249 	CleanupStack::PushL(templateRecord);
       
   250 	
       
   251 	User::LeaveIfError(templateRecord->Modify());
       
   252 
       
   253 	TBufC<KCommsDbSvrMaxFieldLength> inputString = _L("string");
       
   254 	templateRecord->WriteTextL(TPtrC(COMMDB_NAME), _L("DummyName"));
       
   255 	templateRecord->WriteTextL(TPtrC(MODEM_PORT_NAME), inputString);
       
   256 	User::LeaveIfError(templateRecord->StoreModifications());
       
   257 
       
   258 	CleanupStack::PopAndDestroy(templateRecord);
       
   259 
       
   260 	//Create a view on the modem table, make a new record and overwrite the value set in the template
       
   261 
       
   262 	CCommsDbTableView* tableView = iTheDb->OpenTableLC(TPtrC(MODEM_BEARER));
       
   263 	TUint32 dummyId;
       
   264 	//Create a new record, so we can be sure it is the same as the templated one
       
   265 	User::LeaveIfError(tableView->InsertRecord(dummyId));
       
   266 	tableView->WriteTextL(TPtrC(COMMDB_NAME), _L("NewModem"));
       
   267 	//Do overwrite of setting
       
   268 	TBufC<KCommsDbSvrMaxFieldLength> overwriteString = _L("different string");
       
   269 	tableView->WriteTextL(TPtrC(MODEM_PORT_NAME), overwriteString);
       
   270 	User::LeaveIfError(tableView->PutRecordChanges());
       
   271 
       
   272 	//Retrieve the string we just set
       
   273 	TBuf<KCommsDbSvrMaxFieldLength> retrievedString;
       
   274 	tableView->ReadTextL(TPtrC(MODEM_PORT_NAME), retrievedString);
       
   275 	CleanupStack::PopAndDestroy(tableView);
       
   276 
       
   277 	if(retrievedString!=overwriteString)
       
   278 		return KErrGeneral;
       
   279 
       
   280 	return KErrNone;
       
   281 	}
       
   282 	
       
   283 TVerdict CCommDbTest036_04::doTestStepPostambleL()
       
   284 	{
       
   285 	delete iTheDb;
       
   286 	iTheDb=NULL;
       
   287         SetTestStepResult(EPass);	return TestStepResult();
       
   288 	}
       
   289 
       
   290 /////////////////////////////////////////////////////////////////////////
       
   291 
       
   292 CCommDbTest036_05::CCommDbTest036_05()
       
   293 	{
       
   294 	// store the name of this test case
       
   295 	SetTestStepName(_L("step_036_05"));
       
   296 	}
       
   297 
       
   298 CCommDbTest036_05::~CCommDbTest036_05()
       
   299 	{}
       
   300 
       
   301 TVerdict CCommDbTest036_05::doTestStepL( void )
       
   302 	{
       
   303 	if(executeStepL()!=KErrNone)
       
   304          SetTestStepResult(EFail);        SetTestStepResult(EPass);	return TestStepResult();
       
   305 	}
       
   306 
       
   307 TVerdict CCommDbTest036_05::doTestStepPreambleL()
       
   308 	{
       
   309 	iTheDb=CCommsDatabase::NewL();
       
   310 
       
   311         SetTestStepResult(EPass);	return TestStepResult();
       
   312 	}
       
   313 
       
   314 TInt CCommDbTest036_05::executeStepL()
       
   315 	{
       
   316 	CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(DIAL_IN_ISP));
       
   317 	CleanupStack::PushL(templateRecord);
       
   318 	
       
   319 	User::LeaveIfError(templateRecord->Modify());
       
   320 
       
   321 	TBufC<KCommsDbSvrMaxFieldLength> inputString = _L("test string");
       
   322 	templateRecord->WriteTextL(TPtrC(COMMDB_NAME), _L("Name"));
       
   323 //	templateRecord->WriteTextL(TPtrC(ISP_IF_NAME), _L("SLIP"));
       
   324 	templateRecord->WriteBoolL(TPtrC(ISP_IP_ADDR_FROM_SERVER), ETrue);
       
   325 	templateRecord->WriteBoolL(TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER), ETrue);
       
   326 	templateRecord->WriteBoolL(TPtrC(ISP_IP6_DNS_ADDR_FROM_SERVER), ETrue);
       
   327 	templateRecord->WriteLongTextL(TPtrC(ISP_LOGIN_SCRIPT), inputString);
       
   328 	User::LeaveIfError(templateRecord->StoreModifications());
       
   329 
       
   330 	CleanupStack::PopAndDestroy(templateRecord);
       
   331 
       
   332 	//Create a view on the DialInISP table, make a new record and check the value is the one set for the template
       
   333 
       
   334 	CCommsDbTableView* tableView = iTheDb->OpenTableLC(TPtrC(DIAL_IN_ISP));
       
   335 	TUint32 dummyId;
       
   336 	//Create a new record, so we can be sure it is the same as the templated one
       
   337 	User::LeaveIfError(tableView->InsertRecord(dummyId));
       
   338 	tableView->WriteTextL(TPtrC(COMMDB_NAME), _L("Test ISP"));
       
   339 //	tableView->WriteTextL(TPtrC(ISP_IF_NAME), _L("Test If"));
       
   340 	tableView->WriteBoolL(TPtrC(ISP_IP_ADDR_FROM_SERVER), EFalse);
       
   341 	tableView->WriteBoolL(TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER), EFalse);
       
   342 	tableView->WriteBoolL(TPtrC(ISP_IP6_DNS_ADDR_FROM_SERVER), EFalse);
       
   343 	User::LeaveIfError(tableView->PutRecordChanges());
       
   344 
       
   345 	//Retrieve the string we set for the template
       
   346 	HBufC* retrievedString = tableView->ReadLongTextLC(TPtrC(ISP_LOGIN_SCRIPT));
       
   347 
       
   348 	TInt ret(KErrNone);
       
   349 	if(*retrievedString!=inputString)
       
   350 		ret= KErrGeneral;
       
   351 
       
   352 	CleanupStack::PopAndDestroy();	//retrievedString
       
   353 	CleanupStack::PopAndDestroy(tableView);
       
   354 
       
   355 	return ret;
       
   356 	}
       
   357 	
       
   358 TVerdict CCommDbTest036_05::doTestStepPostambleL()
       
   359 	{
       
   360 	delete iTheDb;
       
   361 	iTheDb=NULL;
       
   362         SetTestStepResult(EPass);	return TestStepResult();
       
   363 	}
       
   364 
       
   365 /////////////////////////////////////////////////////////////////////////
       
   366 
       
   367 CCommDbTest036_06::CCommDbTest036_06()
       
   368 	{
       
   369 	// store the name of this test case
       
   370 	SetTestStepName(_L("step_036_06"));
       
   371 	}
       
   372 
       
   373 CCommDbTest036_06::~CCommDbTest036_06()
       
   374 	{}
       
   375 
       
   376 TVerdict CCommDbTest036_06::doTestStepL( void )
       
   377 	{
       
   378 	if(executeStepL()!=KErrNone)
       
   379          SetTestStepResult(EFail);        SetTestStepResult(EPass);	return TestStepResult();
       
   380 	}
       
   381 
       
   382 TVerdict CCommDbTest036_06::doTestStepPreambleL()
       
   383 	{
       
   384 	iTheDb=CCommsDatabase::NewL();
       
   385 
       
   386         SetTestStepResult(EPass);	return TestStepResult();
       
   387 	}
       
   388 
       
   389 TInt CCommDbTest036_06::executeStepL()
       
   390 	{
       
   391 	CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(DIAL_IN_ISP));
       
   392 	CleanupStack::PushL(templateRecord);
       
   393 	
       
   394 	User::LeaveIfError(templateRecord->Modify());
       
   395 
       
   396 	TBufC<KCommsDbSvrMaxFieldLength> inputString = _L("test string");
       
   397 	templateRecord->WriteTextL(TPtrC(COMMDB_NAME), _L("Name"));
       
   398 //	templateRecord->WriteTextL(TPtrC(ISP_IF_NAME), _L("SLIP"));
       
   399 	templateRecord->WriteBoolL(TPtrC(ISP_IP_ADDR_FROM_SERVER), ETrue);
       
   400 	templateRecord->WriteBoolL(TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER), ETrue);
       
   401 	templateRecord->WriteBoolL(TPtrC(ISP_IP6_DNS_ADDR_FROM_SERVER), ETrue);
       
   402 	templateRecord->WriteLongTextL(TPtrC(ISP_LOGIN_SCRIPT), inputString);
       
   403 	User::LeaveIfError(templateRecord->StoreModifications());
       
   404 
       
   405 	CleanupStack::PopAndDestroy(templateRecord);
       
   406 
       
   407 	//Create a view on the DialInISP table, make a new record and change the value we set int he template
       
   408 
       
   409 	CCommsDbTableView* tableView = iTheDb->OpenTableLC(TPtrC(DIAL_IN_ISP));
       
   410 	TUint32 dummyId;
       
   411 	//Create a new record, so we can be sure it is the same as the templated one
       
   412 	User::LeaveIfError(tableView->InsertRecord(dummyId));
       
   413 	tableView->WriteTextL(TPtrC(COMMDB_NAME), _L("Test ISP"));
       
   414 //	tableView->WriteTextL(TPtrC(ISP_IF_NAME), _L("Test If"));
       
   415 	tableView->WriteBoolL(TPtrC(ISP_IP_ADDR_FROM_SERVER), EFalse);
       
   416 	tableView->WriteBoolL(TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER), EFalse);
       
   417 	tableView->WriteBoolL(TPtrC(ISP_IP6_DNS_ADDR_FROM_SERVER), EFalse);
       
   418 	//Overwrite value set above in template
       
   419 	TBufC<KCommsDbSvrMaxFieldLength> overwriteString = _L("new string");
       
   420 	tableView->WriteLongTextL(TPtrC(ISP_LOGIN_SCRIPT), overwriteString);
       
   421 	User::LeaveIfError(tableView->PutRecordChanges());
       
   422 
       
   423 	//Retrieve the string we just set
       
   424 	HBufC* retrievedString = tableView->ReadLongTextLC(TPtrC(ISP_LOGIN_SCRIPT));
       
   425 
       
   426 	TInt ret(KErrNone);
       
   427 	if(*retrievedString!=overwriteString)
       
   428 		ret= KErrGeneral;
       
   429 
       
   430 	CleanupStack::PopAndDestroy();	//retrievedString
       
   431 	CleanupStack::PopAndDestroy(tableView);
       
   432 
       
   433 	return ret;
       
   434 	}
       
   435 	
       
   436 TVerdict CCommDbTest036_06::doTestStepPostambleL()
       
   437 	{
       
   438 	delete iTheDb;
       
   439 	iTheDb=NULL;
       
   440         SetTestStepResult(EPass);	return TestStepResult();
       
   441 	}
       
   442 
       
   443 /////////////////////////////////////////////////////////////////////////
       
   444 
       
   445 CCommDbTest036_07::CCommDbTest036_07()
       
   446 	{
       
   447 	// store the name of this test case
       
   448 	SetTestStepName(_L("step_036_07"));
       
   449 	}
       
   450 
       
   451 CCommDbTest036_07::~CCommDbTest036_07()
       
   452 	{}
       
   453 
       
   454 TVerdict CCommDbTest036_07::doTestStepL( void )
       
   455 	{
       
   456 	if(executeStepL()!=KErrNone)
       
   457          SetTestStepResult(EFail);        SetTestStepResult(EPass);	return TestStepResult();
       
   458 	}
       
   459 
       
   460 TVerdict CCommDbTest036_07::doTestStepPreambleL()
       
   461 	{
       
   462 	iTheDb=CCommsDatabase::NewL();
       
   463 
       
   464         SetTestStepResult(EPass);	return TestStepResult();
       
   465 	}
       
   466 
       
   467 TInt CCommDbTest036_07::executeStepL()
       
   468 	{
       
   469 	CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(DIAL_IN_ISP));
       
   470 	CleanupStack::PushL(templateRecord);
       
   471 	
       
   472 	User::LeaveIfError(templateRecord->Modify());
       
   473 
       
   474 	TBool inputBool = ETrue;
       
   475 	templateRecord->WriteTextL(TPtrC(COMMDB_NAME), _L("Name"));
       
   476 //	templateRecord->WriteTextL(TPtrC(ISP_IF_NAME), _L("SLIP"));
       
   477 	templateRecord->WriteBoolL(TPtrC(ISP_IP_ADDR_FROM_SERVER), ETrue);
       
   478 	templateRecord->WriteBoolL(TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER), ETrue);
       
   479 	templateRecord->WriteBoolL(TPtrC(ISP_IP6_DNS_ADDR_FROM_SERVER), ETrue);
       
   480 	templateRecord->WriteBoolL(TPtrC(ISP_USE_LOGIN_SCRIPT), inputBool);	//Set to ETrue, since EFalse is default
       
   481 	User::LeaveIfError(templateRecord->StoreModifications());
       
   482 
       
   483 	CleanupStack::PopAndDestroy(templateRecord);
       
   484 
       
   485 	//Create a view on the DialInISP table, make a new record and check the value is the one set for the template
       
   486 
       
   487 	CCommsDbTableView* tableView = iTheDb->OpenTableLC(TPtrC(DIAL_IN_ISP));
       
   488 	TUint32 dummyId;
       
   489 	//Create a new record, so we can be sure it is the same as the templated one
       
   490 	User::LeaveIfError(tableView->InsertRecord(dummyId));
       
   491 	tableView->WriteTextL(TPtrC(COMMDB_NAME), _L("Test ISP"));
       
   492 //	tableView->WriteTextL(TPtrC(ISP_IF_NAME), _L("Test If"));
       
   493 	tableView->WriteBoolL(TPtrC(ISP_IP_ADDR_FROM_SERVER), EFalse);
       
   494 	tableView->WriteBoolL(TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER), EFalse);
       
   495 	tableView->WriteBoolL(TPtrC(ISP_IP6_DNS_ADDR_FROM_SERVER), EFalse);
       
   496 	User::LeaveIfError(tableView->PutRecordChanges());
       
   497 
       
   498 	//Retrieve the bool we set for the template
       
   499 	TBool retrievedBool;
       
   500 	tableView->ReadBoolL(TPtrC(ISP_USE_LOGIN_SCRIPT), retrievedBool);
       
   501 
       
   502 	CleanupStack::PopAndDestroy(tableView);
       
   503 
       
   504 	if(retrievedBool!=inputBool)
       
   505 		return KErrGeneral;
       
   506 
       
   507 	return KErrNone;
       
   508 	}
       
   509 	
       
   510 TVerdict CCommDbTest036_07::doTestStepPostambleL()
       
   511 	{
       
   512 	delete iTheDb;
       
   513 	iTheDb=NULL;
       
   514         SetTestStepResult(EPass);	return TestStepResult();
       
   515 	}
       
   516 
       
   517 /////////////////////////////////////////////////////////////////////////
       
   518 
       
   519 CCommDbTest036_08::CCommDbTest036_08()
       
   520 	{
       
   521 	// store the name of this test case
       
   522 	SetTestStepName(_L("step_036_08"));
       
   523 	}
       
   524 
       
   525 CCommDbTest036_08::~CCommDbTest036_08()
       
   526 	{}
       
   527 
       
   528 TVerdict CCommDbTest036_08::doTestStepL( void )
       
   529 	{
       
   530 	if(executeStepL()!=KErrNone)
       
   531          SetTestStepResult(EFail);        SetTestStepResult(EPass);	return TestStepResult();
       
   532 	}
       
   533 
       
   534 TVerdict CCommDbTest036_08::doTestStepPreambleL()
       
   535 	{
       
   536 	iTheDb=CCommsDatabase::NewL();
       
   537 
       
   538         SetTestStepResult(EPass);	return TestStepResult();
       
   539 	}
       
   540 
       
   541 TInt CCommDbTest036_08::executeStepL()
       
   542 	{
       
   543 	CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(DIAL_IN_ISP));
       
   544 	CleanupStack::PushL(templateRecord);
       
   545 	
       
   546 	User::LeaveIfError(templateRecord->Modify());
       
   547 
       
   548 	TBool inputBool = ETrue;
       
   549 	templateRecord->WriteTextL(TPtrC(COMMDB_NAME), _L("Name"));
       
   550 //	templateRecord->WriteTextL(TPtrC(ISP_IF_NAME), _L("SLIP"));
       
   551 	templateRecord->WriteBoolL(TPtrC(ISP_IP_ADDR_FROM_SERVER), ETrue);
       
   552 	templateRecord->WriteBoolL(TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER), ETrue);
       
   553 	templateRecord->WriteBoolL(TPtrC(ISP_IP6_DNS_ADDR_FROM_SERVER), ETrue);
       
   554 	templateRecord->WriteBoolL(TPtrC(ISP_USE_LOGIN_SCRIPT), inputBool);	//Set to ETrue, since EFalse is default
       
   555 	User::LeaveIfError(templateRecord->StoreModifications());
       
   556 
       
   557 	CleanupStack::PopAndDestroy(templateRecord);
       
   558 
       
   559 	//Create a view on the DialInISP table, make a new record and change the value we set in the template
       
   560 
       
   561 	CCommsDbTableView* tableView = iTheDb->OpenTableLC(TPtrC(DIAL_IN_ISP));
       
   562 	TUint32 dummyId;
       
   563 	//Create a new record, so we can be sure it is the same as the templated one
       
   564 	User::LeaveIfError(tableView->InsertRecord(dummyId));
       
   565 	tableView->WriteTextL(TPtrC(COMMDB_NAME), _L("Test ISP"));
       
   566 //	tableView->WriteTextL(TPtrC(ISP_IF_NAME), _L("Test If"));
       
   567 	tableView->WriteBoolL(TPtrC(ISP_IP_ADDR_FROM_SERVER), EFalse);
       
   568 	tableView->WriteBoolL(TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER), EFalse);
       
   569 	tableView->WriteBoolL(TPtrC(ISP_IP6_DNS_ADDR_FROM_SERVER), EFalse);
       
   570 	//Overwrite the value set in the template
       
   571 	TBool overwriteBool = EFalse;
       
   572 	tableView->WriteBoolL(TPtrC(ISP_USE_LOGIN_SCRIPT), overwriteBool);
       
   573 	User::LeaveIfError(tableView->PutRecordChanges());
       
   574 
       
   575 	//Retrieve the bool we just set for the record
       
   576 	TBool retrievedBool;
       
   577 	tableView->ReadBoolL(TPtrC(ISP_USE_LOGIN_SCRIPT), retrievedBool);
       
   578 
       
   579 	CleanupStack::PopAndDestroy(tableView);
       
   580 
       
   581 	if(retrievedBool!=overwriteBool)
       
   582 		return KErrGeneral;
       
   583 
       
   584 	return KErrNone;
       
   585 	}
       
   586 	
       
   587 TVerdict CCommDbTest036_08::doTestStepPostambleL()
       
   588 	{
       
   589 	delete iTheDb;
       
   590 	iTheDb=NULL;
       
   591         SetTestStepResult(EPass);	return TestStepResult();
       
   592 	}
       
   593 
       
   594 /////////////////////////////////////////////////////////////////////////
       
   595 
       
   596 CCommDbTest036_09::CCommDbTest036_09()
       
   597 	{
       
   598 	// store the name of this test case
       
   599 	SetTestStepName(_L("step_036_09"));
       
   600 	}
       
   601 
       
   602 CCommDbTest036_09::~CCommDbTest036_09()
       
   603 	{}
       
   604 
       
   605 TVerdict CCommDbTest036_09::doTestStepL( void )
       
   606 	{
       
   607 	if(executeStepL()!=KErrNone)
       
   608          SetTestStepResult(EFail);        SetTestStepResult(EPass);	return TestStepResult();
       
   609 	}
       
   610 
       
   611 TVerdict CCommDbTest036_09::doTestStepPreambleL()
       
   612 	{
       
   613 	iTheDb=CCommsDatabase::NewL();
       
   614 
       
   615         SetTestStepResult(EPass);	return TestStepResult();
       
   616 	}
       
   617 
       
   618 TInt CCommDbTest036_09::executeStepL()
       
   619 	{
       
   620 	CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(DIAL_IN_ISP));
       
   621 	CleanupStack::PushL(templateRecord);
       
   622 	User::LeaveIfError(templateRecord->Modify());
       
   623 
       
   624 	TUint32 inputInt = RMobileCall::KCapsSpeed32000;
       
   625 	templateRecord->WriteTextL(TPtrC(COMMDB_NAME), _L("Name"));
       
   626 	templateRecord->WriteTextL(TPtrC(ISP_IP_NAME_SERVER1),_L("MyDnsServer"));
       
   627 	templateRecord->WriteBoolL(TPtrC(ISP_IP_ADDR_FROM_SERVER), ETrue);
       
   628 	templateRecord->WriteBoolL(TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER), ETrue);
       
   629 	templateRecord->WriteBoolL(TPtrC(ISP_IP6_DNS_ADDR_FROM_SERVER), ETrue);
       
   630 	templateRecord->WriteUintL(TPtrC(ISP_BEARER_SPEED), inputInt);
       
   631 	User::LeaveIfError(templateRecord->StoreModifications());
       
   632 
       
   633 	CleanupStack::PopAndDestroy(templateRecord);
       
   634 
       
   635 	//Create a view on the DialInISP table, make a new record and check the value is the one set for the template
       
   636 
       
   637 	CCommsDbTableView* tableView = iTheDb->OpenTableLC(TPtrC(DIAL_IN_ISP));
       
   638 	TUint32 dummyId;
       
   639 	//Create a new record, so we can be sure it is the same as the templated one
       
   640 	User::LeaveIfError(tableView->InsertRecord(dummyId));
       
   641 	tableView->WriteTextL(TPtrC(COMMDB_NAME), _L("Test ISP"));
       
   642 	tableView->WriteTextL(TPtrC(ISP_IP_NAME_SERVER1),_L("NotMyDnsServer"));
       
   643 	tableView->WriteBoolL(TPtrC(ISP_IP_ADDR_FROM_SERVER), EFalse);
       
   644 	tableView->WriteBoolL(TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER), EFalse);
       
   645 	tableView->WriteBoolL(TPtrC(ISP_IP6_DNS_ADDR_FROM_SERVER), EFalse);
       
   646 	User::LeaveIfError(tableView->PutRecordChanges());
       
   647 
       
   648 	//Retrieve the TUint32 we set for the template
       
   649 	TUint32 retrievedInt;
       
   650 	tableView->ReadUintL(TPtrC(ISP_BEARER_SPEED), retrievedInt);
       
   651 	// And now check that we retrieve the text from the template
       
   652 
       
   653 	TBuf16<KCommsDbSvrMaxFieldLength> ifAuthName(_L16("Invalid"));
       
   654 	tableView->ReadTextL(TPtrC(ISP_IP_NAME_SERVER1), ifAuthName);
       
   655 	if(ifAuthName.Compare(_L16("NotMyDnsServer")))
       
   656 		{
       
   657 		User::Leave(KErrGeneral);
       
   658 		}
       
   659 
       
   660 	CleanupStack::PopAndDestroy(tableView);
       
   661 
       
   662 	if(retrievedInt!=inputInt)
       
   663 		return KErrGeneral;
       
   664 
       
   665 	return KErrNone;
       
   666 	}
       
   667 	
       
   668 TVerdict CCommDbTest036_09::doTestStepPostambleL()
       
   669 	{
       
   670 	delete iTheDb;
       
   671 	iTheDb=NULL;
       
   672         SetTestStepResult(EPass);	return TestStepResult();
       
   673 	}
       
   674 
       
   675 /////////////////////////////////////////////////////////////////////////
       
   676 
       
   677 CCommDbTest036_10::CCommDbTest036_10()
       
   678 	{
       
   679 	// store the name of this test case
       
   680 	SetTestStepName(_L("step_036_10"));
       
   681 	}
       
   682 
       
   683 CCommDbTest036_10::~CCommDbTest036_10()
       
   684 	{}
       
   685 
       
   686 TVerdict CCommDbTest036_10::doTestStepL( void )
       
   687 	{
       
   688 	if(executeStepL()!=KErrNone)
       
   689          SetTestStepResult(EFail);        SetTestStepResult(EPass);	return TestStepResult();
       
   690 	}
       
   691 
       
   692 TVerdict CCommDbTest036_10::doTestStepPreambleL()
       
   693 	{
       
   694 	iTheDb=CCommsDatabase::NewL();
       
   695 
       
   696         SetTestStepResult(EPass);	return TestStepResult();
       
   697 	}
       
   698 
       
   699 TInt CCommDbTest036_10::executeStepL()
       
   700 	{
       
   701 	CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(DIAL_IN_ISP));
       
   702 	CleanupStack::PushL(templateRecord);
       
   703 	
       
   704 	User::LeaveIfError(templateRecord->Modify());
       
   705 
       
   706 	TUint32 inputInt = RMobileCall::KCapsSpeed32000;
       
   707 	templateRecord->WriteTextL(TPtrC(COMMDB_NAME), _L("Name"));
       
   708 	templateRecord->WriteTextL(TPtrC(ISP_IP_NAME_SERVER1),_L("MyDnsServer"));
       
   709 	templateRecord->WriteBoolL(TPtrC(ISP_IP_ADDR_FROM_SERVER), ETrue);
       
   710 	templateRecord->WriteBoolL(TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER), ETrue);
       
   711 	templateRecord->WriteBoolL(TPtrC(ISP_IP6_DNS_ADDR_FROM_SERVER), ETrue);
       
   712 	templateRecord->WriteUintL(TPtrC(ISP_BEARER_SPEED), inputInt);
       
   713 	User::LeaveIfError(templateRecord->StoreModifications());
       
   714 
       
   715 	CleanupStack::PopAndDestroy(templateRecord);
       
   716 
       
   717 	//Create a view on the DialInISP table, make a new record and change the value we set in the template
       
   718 	CCommsDbTableView* tableView = iTheDb->OpenTableLC(TPtrC(DIAL_IN_ISP));
       
   719 	TUint32 dummyId;
       
   720 	//Create a new record, so we can be sure it is the same as the templated one
       
   721 	User::LeaveIfError(tableView->InsertRecord(dummyId));
       
   722 	tableView->WriteTextL(TPtrC(COMMDB_NAME), _L("Test ISP"));
       
   723 	tableView->WriteBoolL(TPtrC(ISP_IP_ADDR_FROM_SERVER), EFalse);
       
   724 	tableView->WriteBoolL(TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER), EFalse);
       
   725 	tableView->WriteBoolL(TPtrC(ISP_IP6_DNS_ADDR_FROM_SERVER), EFalse);
       
   726 	//Overwrite value we set in the template
       
   727 	TUint32 overwriteInt = RMobileCall::KCapsSpeed64000;
       
   728 	tableView->WriteUintL(TPtrC(ISP_BEARER_SPEED), overwriteInt);
       
   729 	User::LeaveIfError(tableView->PutRecordChanges());
       
   730 
       
   731 	//Retrieve the TUint32 we just set
       
   732 	TUint32 retrievedInt;
       
   733 	tableView->ReadUintL(TPtrC(ISP_BEARER_SPEED), retrievedInt);
       
   734 
       
   735 	TBuf16<KCommsDbSvrMaxFieldLength> ifAuthName(_L16("Invalid"));
       
   736 	tableView->ReadTextL(TPtrC(ISP_IP_NAME_SERVER1), ifAuthName);
       
   737 	if(ifAuthName.Compare(_L16("MyDnsServer")))
       
   738 		{
       
   739 		User::Leave(KErrGeneral);
       
   740 		}
       
   741 
       
   742 	CleanupStack::PopAndDestroy(tableView);
       
   743 
       
   744 	if(retrievedInt!=overwriteInt)
       
   745 		return KErrGeneral;
       
   746 
       
   747 	return KErrNone;
       
   748 	}
       
   749 	
       
   750 TVerdict CCommDbTest036_10::doTestStepPostambleL()
       
   751 	{
       
   752 	delete iTheDb;
       
   753 	iTheDb=NULL;
       
   754         SetTestStepResult(EPass);	return TestStepResult();
       
   755 	}
       
   756 
       
   757 /////////////////////////////////////////////////////////////////////////
       
   758 
       
   759 CCommDbTest036_11::CCommDbTest036_11()
       
   760 	{
       
   761 	// store the name of this test case
       
   762 	SetTestStepName(_L("step_036_11"));
       
   763 	}
       
   764 
       
   765 CCommDbTest036_11::~CCommDbTest036_11()
       
   766 	{}
       
   767 
       
   768 TVerdict CCommDbTest036_11::doTestStepL( void )
       
   769 	{
       
   770 	executeStepL();
       
   771         SetTestStepResult(EFail);	return TestStepResult();	//Test is supposed to panic, so if we get here we've failed
       
   772 	}
       
   773 
       
   774 TVerdict CCommDbTest036_11::doTestStepPreambleL()
       
   775 	{
       
   776 	iTheDb=CCommsDatabase::NewL();
       
   777 
       
   778         SetTestStepResult(EPass);	return TestStepResult();
       
   779 	}
       
   780 
       
   781 TInt CCommDbTest036_11::executeStepL()
       
   782 	{
       
   783 	CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(DIAL_IN_ISP));
       
   784 	CleanupStack::PushL(templateRecord);
       
   785 	
       
   786 	templateRecord->StoreModifications();
       
   787 
       
   788 	CleanupStack::PopAndDestroy(templateRecord);
       
   789 
       
   790 	return KErrGeneral;
       
   791 	}
       
   792 	
       
   793 TVerdict CCommDbTest036_11::doTestStepPostambleL()
       
   794 	{
       
   795 	delete iTheDb;
       
   796 	iTheDb=NULL;
       
   797         SetTestStepResult(EPass);	return TestStepResult();
       
   798 	}
       
   799 
       
   800 /////////////////////////////////////////////////////////////////////////
       
   801 
       
   802 CCommDbTest036_12::CCommDbTest036_12()
       
   803 	{
       
   804 	// store the name of this test case
       
   805 	SetTestStepName(_L("step_036_12"));
       
   806 	}
       
   807 
       
   808 CCommDbTest036_12::~CCommDbTest036_12()
       
   809 	{}
       
   810 
       
   811 TVerdict CCommDbTest036_12::doTestStepL( void )
       
   812 	{
       
   813 	executeStepL();
       
   814         SetTestStepResult(EFail);	return TestStepResult();	//Test should panic, so if we get here something's wrong
       
   815 	}
       
   816 
       
   817 TVerdict CCommDbTest036_12::doTestStepPreambleL()
       
   818 	{
       
   819 	iTheDb=CCommsDatabase::NewL();
       
   820 
       
   821         SetTestStepResult(EPass);	return TestStepResult();
       
   822 	}
       
   823 
       
   824 TInt CCommDbTest036_12::executeStepL()
       
   825 	{
       
   826 	CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(DIAL_IN_ISP));
       
   827 	CleanupStack::PushL(templateRecord);
       
   828 	
       
   829 	templateRecord->WriteBoolL(TPtrC(ISP_USE_LOGIN_SCRIPT), ETrue);
       
   830 
       
   831 	CleanupStack::PopAndDestroy(templateRecord);
       
   832 	return KErrGeneral;
       
   833 	}
       
   834 	
       
   835 TVerdict CCommDbTest036_12::doTestStepPostambleL()
       
   836 	{
       
   837 	delete iTheDb;
       
   838 	iTheDb=NULL;
       
   839         SetTestStepResult(EPass);	return TestStepResult();
       
   840 	}
       
   841 
       
   842 /////////////////////////////////////////////////////////////////////////
       
   843 
       
   844 CCommDbTest036_13::CCommDbTest036_13()
       
   845 	{
       
   846 	// store the name of this test case
       
   847 	SetTestStepName(_L("step_036_13"));
       
   848 	}
       
   849 
       
   850 CCommDbTest036_13::~CCommDbTest036_13()
       
   851 	{}
       
   852 
       
   853 TVerdict CCommDbTest036_13::doTestStepL( void )
       
   854 	{
       
   855 	if (executeStepL()!=KErrNotFound)
       
   856          SetTestStepResult(EFail);        SetTestStepResult(EPass);	return TestStepResult();
       
   857 	}
       
   858 
       
   859 TVerdict CCommDbTest036_13::doTestStepPreambleL()
       
   860 	{
       
   861 	iTheDb=CCommsDatabase::NewL();
       
   862 
       
   863         SetTestStepResult(EPass);	return TestStepResult();
       
   864 	}
       
   865 
       
   866 TInt CCommDbTest036_13::executeStepL()
       
   867 	{
       
   868 	CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(DIAL_IN_ISP));
       
   869 	CleanupStack::PushL(templateRecord);
       
   870 
       
   871 	User::LeaveIfError(templateRecord->Modify());
       
   872 	TRAPD(err, templateRecord->WriteBoolL(_L("Invalid"), ETrue));
       
   873 
       
   874 	CleanupStack::PopAndDestroy(templateRecord);
       
   875 	return err;
       
   876 	}
       
   877 	
       
   878 TVerdict CCommDbTest036_13::doTestStepPostambleL()
       
   879 	{
       
   880 	delete iTheDb;
       
   881 	iTheDb=NULL;
       
   882         SetTestStepResult(EPass);	return TestStepResult();
       
   883 	}
       
   884 
       
   885 /////////////////////////////////////////////////////////////////////////
       
   886 
       
   887 CCommDbTest036_14::CCommDbTest036_14()
       
   888 	{
       
   889 	// store the name of this test case
       
   890 	SetTestStepName(_L("step_036_14"));
       
   891 	}
       
   892 
       
   893 CCommDbTest036_14::~CCommDbTest036_14()
       
   894 	{}
       
   895 
       
   896 TVerdict CCommDbTest036_14::doTestStepL( void )
       
   897 	{
       
   898 	if (executeStepL()!=KErrNotFound)
       
   899          SetTestStepResult(EFail);        SetTestStepResult(EPass);	return TestStepResult();
       
   900 	}
       
   901 
       
   902 TVerdict CCommDbTest036_14::doTestStepPreambleL()
       
   903 	{
       
   904 	iTheDb=CCommsDatabase::NewL();
       
   905 
       
   906         SetTestStepResult(EPass);	return TestStepResult();
       
   907 	}
       
   908 
       
   909 TInt CCommDbTest036_14::executeStepL()
       
   910 	{
       
   911 	CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(DIAL_IN_ISP));
       
   912 	CleanupStack::PushL(templateRecord);
       
   913 
       
   914 	User::LeaveIfError(templateRecord->Modify());
       
   915 	TRAPD(err, templateRecord->WriteBoolL(_L(""), ETrue));
       
   916 
       
   917 	CleanupStack::PopAndDestroy(templateRecord);
       
   918 	return err;
       
   919 	}
       
   920 	
       
   921 TVerdict CCommDbTest036_14::doTestStepPostambleL()
       
   922 	{
       
   923 	delete iTheDb;
       
   924 	iTheDb=NULL;
       
   925         SetTestStepResult(EPass);	return TestStepResult();
       
   926 	}
       
   927 
       
   928 /////////////////////////////////////////////////////////////////////////
       
   929 
       
   930 CCommDbTest036_15::CCommDbTest036_15()
       
   931 	{
       
   932 	// store the name of this test case
       
   933 	SetTestStepName(_L("step_036_15"));
       
   934 	}
       
   935 
       
   936 CCommDbTest036_15::~CCommDbTest036_15()
       
   937 	{}
       
   938 
       
   939 TVerdict CCommDbTest036_15::doTestStepL( void )
       
   940 	{
       
   941 	if (executeStepL()!=KErrNotFound)
       
   942          SetTestStepResult(EFail);        SetTestStepResult(EPass);	return TestStepResult();
       
   943 	}
       
   944 
       
   945 TVerdict CCommDbTest036_15::doTestStepPreambleL()
       
   946 	{
       
   947 	iTheDb=CCommsDatabase::NewL();
       
   948 
       
   949         SetTestStepResult(EPass);	return TestStepResult();
       
   950 	}
       
   951 
       
   952 TInt CCommDbTest036_15::executeStepL()
       
   953 	{
       
   954 	CCommsDbTemplateRecord* templateRecord = CCommsDbTemplateRecord::NewL(iTheDb, TPtrC(DIAL_IN_ISP));
       
   955 	CleanupStack::PushL(templateRecord);
       
   956 
       
   957 	TBool dummyBool;
       
   958 	TRAPD(err, templateRecord->ReadBoolL(_L("Invalid"), dummyBool));
       
   959 
       
   960 	CleanupStack::PopAndDestroy(templateRecord);
       
   961 	return err;
       
   962 	}
       
   963 	
       
   964 TVerdict CCommDbTest036_15::doTestStepPostambleL()
       
   965 	{
       
   966 	delete iTheDb;
       
   967 	iTheDb=NULL;
       
   968         SetTestStepResult(EPass);	return TestStepResult();
       
   969 	}
       
   970 
       
   971 //////////////////////////////////////////////////////////////////////////
       
   972 
       
   973 CCommDbTest036_16::CCommDbTest036_16()
       
   974 	{
       
   975 	// store the name of this test case
       
   976 	SetTestStepName(_L("step_036_16"));
       
   977 	}
       
   978 
       
   979 CCommDbTest036_16::~CCommDbTest036_16()
       
   980 	{}
       
   981 
       
   982 TVerdict CCommDbTest036_16::doTestStepL( void )
       
   983 	{
       
   984 	INFO_PRINTF1(_L("Step 036.16 called "));
       
   985 
       
   986 	SetTestStepResult(EPass);
       
   987 	CCommDbTest036_01* step036_01 = new(ELeave) CCommDbTest036_01;
       
   988 	CleanupStack::PushL(step036_01);
       
   989 	doTestStepWithHeapFailureL( *step036_01, KErrNone);
       
   990 	CleanupStack::PopAndDestroy(step036_01);
       
   991 
       
   992 	CCommDbTest036_02* step036_02 = new(ELeave) CCommDbTest036_02;
       
   993 	CleanupStack::PushL(step036_02);
       
   994 	doTestStepWithHeapFailureL( *step036_02, KErrNone);
       
   995 	CleanupStack::PopAndDestroy(step036_02);
       
   996 
       
   997 	CCommDbTest036_03* step036_03 = new(ELeave) CCommDbTest036_03;
       
   998 	CleanupStack::PushL(step036_03);
       
   999 	doTestStepWithHeapFailureL( *step036_03, KErrNone);
       
  1000 	CleanupStack::PopAndDestroy(step036_03);
       
  1001 	
       
  1002 	CCommDbTest036_04* step036_04 = new(ELeave) CCommDbTest036_04;
       
  1003 	CleanupStack::PushL(step036_04);
       
  1004 	doTestStepWithHeapFailureL( *step036_04, KErrNone);
       
  1005 	CleanupStack::PopAndDestroy(step036_04);
       
  1006 
       
  1007 	CCommDbTest036_05* step036_05 = new(ELeave) CCommDbTest036_05;
       
  1008 	CleanupStack::PushL(step036_05);
       
  1009 	doTestStepWithHeapFailureL( *step036_05, KErrNone);
       
  1010 	CleanupStack::PopAndDestroy(step036_05);
       
  1011 
       
  1012 	CCommDbTest036_06* step036_06 = new(ELeave) CCommDbTest036_06;
       
  1013 	CleanupStack::PushL(step036_06);
       
  1014 	doTestStepWithHeapFailureL( *step036_06, KErrNone);
       
  1015 	CleanupStack::PopAndDestroy(step036_06);
       
  1016 
       
  1017 	CCommDbTest036_07* step036_07 = new(ELeave) CCommDbTest036_07;
       
  1018 	CleanupStack::PushL(step036_07);
       
  1019 	doTestStepWithHeapFailureL( *step036_07, KErrNone);
       
  1020 	CleanupStack::PopAndDestroy(step036_07);
       
  1021 
       
  1022 	CCommDbTest036_08* step036_08 = new(ELeave) CCommDbTest036_08;
       
  1023 	CleanupStack::PushL(step036_08);
       
  1024 	doTestStepWithHeapFailureL( *step036_08, KErrNone);
       
  1025 	CleanupStack::PopAndDestroy(step036_08);
       
  1026 
       
  1027 	CCommDbTest036_09* step036_09 = new(ELeave) CCommDbTest036_09;
       
  1028 	CleanupStack::PushL(step036_09);
       
  1029 	doTestStepWithHeapFailureL( *step036_09, KErrNone);
       
  1030 	CleanupStack::PopAndDestroy(step036_09);
       
  1031 
       
  1032 	CCommDbTest036_10* step036_10 = new(ELeave) CCommDbTest036_10;
       
  1033 	CleanupStack::PushL(step036_10);
       
  1034 	doTestStepWithHeapFailureL( *step036_10, KErrNone);
       
  1035 	CleanupStack::PopAndDestroy(step036_10);
       
  1036 
       
  1037 	CCommDbTest036_13* step036_13 = new(ELeave) CCommDbTest036_13;
       
  1038 	CleanupStack::PushL(step036_13);
       
  1039 	doTestStepWithHeapFailureL( *step036_13, KErrNotFound);
       
  1040 	CleanupStack::PopAndDestroy(step036_13);
       
  1041 
       
  1042 	CCommDbTest036_14* step036_14 = new(ELeave) CCommDbTest036_14;
       
  1043 	CleanupStack::PushL(step036_14);
       
  1044 	doTestStepWithHeapFailureL( *step036_14, KErrNotFound);
       
  1045 	CleanupStack::PopAndDestroy(step036_14);
       
  1046 
       
  1047 	CCommDbTest036_15* step036_15 = new(ELeave) CCommDbTest036_15;
       
  1048 	CleanupStack::PushL(step036_15);
       
  1049 	doTestStepWithHeapFailureL( *step036_15, KErrNotFound);
       
  1050 	CleanupStack::PopAndDestroy(step036_15);
       
  1051 
       
  1052 	return TestStepResult();
       
  1053 	}
       
  1054 
       
  1055 //////////////////////////////////////////////////////////////////////////
       
  1056 
       
  1057 CCommDbTest036_17::CCommDbTest036_17()
       
  1058 	{
       
  1059 	// store the name of this test case
       
  1060 	SetTestStepName(_L("step_036_17"));
       
  1061 	}
       
  1062 
       
  1063 CCommDbTest036_17::~CCommDbTest036_17()
       
  1064 	{}
       
  1065 
       
  1066 TVerdict CCommDbTest036_17::doTestStepL( void )
       
  1067 	{
       
  1068 
       
  1069 	SetTestStepResult(EPass);
       
  1070 	CCommDbTest036_11* step036_11 = new(ELeave) CCommDbTest036_11;
       
  1071 	CleanupStack::PushL(step036_11);
       
  1072 	doTestStepWithHeapFailureL( *step036_11, KErrNone);
       
  1073 	CleanupStack::PopAndDestroy(step036_11);
       
  1074 
       
  1075 	return TestStepResult();
       
  1076 	}
       
  1077 
       
  1078 //////////////////////////////////////////////////////////////////////////
       
  1079 
       
  1080 CCommDbTest036_18::CCommDbTest036_18()
       
  1081 	{
       
  1082 	// store the name of this test case
       
  1083 	SetTestStepName(_L("step_036_18"));
       
  1084 	}
       
  1085 
       
  1086 CCommDbTest036_18::~CCommDbTest036_18()
       
  1087 	{}
       
  1088 
       
  1089 TVerdict CCommDbTest036_18::doTestStepL( void )
       
  1090 	{
       
  1091 
       
  1092 	SetTestStepResult(EPass);
       
  1093 	CCommDbTest036_12* step036_12 = new(ELeave) CCommDbTest036_12;
       
  1094 	CleanupStack::PushL(step036_12);
       
  1095 	doTestStepWithHeapFailureL( *step036_12, KErrNone);
       
  1096 	CleanupStack::PopAndDestroy(step036_12);
       
  1097 
       
  1098 	return TestStepResult();
       
  1099 	}