commsfwtools/preparedefaultcommsdatabase/te_commsdat/src/commsdatValidationTests.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 // CCommsdat100Step
       
    15 // CCommsdat101Step
       
    16 // CCommsdat102Step
       
    17 // CCommsdat103Step
       
    18 // CCommsdat104Step
       
    19 // CCommsdat105Step
       
    20 // 
       
    21 //
       
    22 
       
    23 /**
       
    24  @file commsdatValidationTests.cpp
       
    25 */
       
    26 #include "commsdatValidationTests.h"
       
    27 #include "CommsDatInternalDefs.h"
       
    28 #include "Te_commsdatSuiteDefs.h"
       
    29 #include <e32test.h>
       
    30 #include <commsdat_partner.h>
       
    31 #include <commsdattypesv1_1_partner.h>
       
    32 #include <commsdattypeinfov1_1_internal.h>
       
    33 
       
    34 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
    35 
       
    36 namespace
       
    37 {
       
    38 TBool CheckConnPrefValidation(CommsDat::CMDBSession* aCDSession_v11, 
       
    39 							  CommsDat::CMDBSession* aCDSession_vLatest)
       
    40 	{
       
    41 	TBool result = EFalse;
       
    42 	
       
    43 	CCDConnectionPrefsRecord* connPrefRec1 = static_cast<CCDConnectionPrefsRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord));
       
    44     CleanupStack::PushL(connPrefRec1);
       
    45     
       
    46     //for the mapped APPriorityselPol field
       
    47     CMDBRecordLink<CCDAccessPointRecord>* apPrioritySelPolField = new(ELeave)CMDBRecordLink<CCDAccessPointRecord>();
       
    48     CleanupStack::PushL(apPrioritySelPolField);
       
    49     //the connPref records are mapped in the last APPrioritySelPol record (from the meshpreface.cfg)
       
    50     apPrioritySelPolField->SetRecordId(254);
       
    51     
       
    52     connPrefRec1->SetRecordId(1);
       
    53     connPrefRec1->LoadL(*aCDSession_v11);
       
    54     
       
    55     TInt rank = connPrefRec1->iRanking; 
       
    56     
       
    57     switch (rank)
       
    58     	{
       
    59     	case 1:
       
    60     		{
       
    61     		//rank 1 is mapped into the iAP1 field
       
    62     		apPrioritySelPolField->SetElementId(apPrioritySelPolField->ElementId() | KCDTIdAp1);
       
    63     		break;
       
    64     		}
       
    65     	case 2:
       
    66     		{
       
    67     		//rank 2 is mapped into the iAP2 field
       
    68     		apPrioritySelPolField->SetElementId(apPrioritySelPolField->ElementId() | KCDTIdAp2);
       
    69     		break;
       
    70     		}
       
    71     	default:
       
    72     		User::Leave(KErrNotFound);
       
    73     	}
       
    74     
       
    75     apPrioritySelPolField->LoadL(*aCDSession_vLatest);
       
    76     
       
    77     //at this point we know the elementId of the generated IPProto level AP which links aganst
       
    78     //the link level AP through its' CustomSelectionPolicy field. The value of this field in the
       
    79     //given IPProto AP must be the same as the recordID of the linked IAP record from the ConnPref
       
    80     //record.
       
    81     
       
    82     //so let's read the customSelectionPolicy field from the IPProto AP
       
    83     CMDBField<TInt>* custSelPolField = new(ELeave)CMDBField<TInt>(KCDTIdCustomSelectionPolicy);
       
    84     CleanupStack::PushL(custSelPolField);
       
    85     
       
    86     custSelPolField->SetRecordId((*apPrioritySelPolField & KCDMaskShowRecordId) >> 8);
       
    87     
       
    88     custSelPolField->LoadL(*aCDSession_vLatest);
       
    89     
       
    90     if (connPrefRec1->iDefaultIAP == *custSelPolField)
       
    91     	{
       
    92     	result = ETrue;
       
    93     	}
       
    94     
       
    95     CleanupStack::PopAndDestroy(custSelPolField);
       
    96     CleanupStack::PopAndDestroy(apPrioritySelPolField);
       
    97     CleanupStack::PopAndDestroy(connPrefRec1);
       
    98     
       
    99     return result;
       
   100 	}
       
   101 
       
   102 TInt GetAPNumberL(const TInt aTierValaue, CommsDat::CMDBSession* aCDSession_vLatest)
       
   103 	{
       
   104 	CMDBRecordSet<CCDAccessPointRecord>* ipprotoAPs = new(ELeave)CMDBRecordSet<CCDAccessPointRecord>(KCDTIdAccessPointRecord);
       
   105 	CleanupStack::PushL(ipprotoAPs);
       
   106 	
       
   107 	CCDAccessPointRecord* primedIPProtoAP = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord));
       
   108 	CleanupStack::PushL(primedIPProtoAP);
       
   109 	
       
   110 	primedIPProtoAP->iTier = aTierValaue;
       
   111 	
       
   112 	ipprotoAPs->iRecords.AppendL(primedIPProtoAP);
       
   113 	//the ownership of the primed record is now at the recordset
       
   114 	CleanupStack::Pop(primedIPProtoAP);
       
   115 	
       
   116 	ipprotoAPs->FindL(*aCDSession_vLatest);
       
   117 	
       
   118 	TInt apNum = ipprotoAPs->iRecords.Count();
       
   119 	
       
   120 	CleanupStack::PopAndDestroy(ipprotoAPs);
       
   121 	
       
   122 	return apNum;
       
   123 	}
       
   124 
       
   125 }
       
   126 #endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
   127 
       
   128 void CConnectionPrefValidationTestBase::deleteAllL()
       
   129 	{
       
   130 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
   131 	CMDBSession *cmdbSession = CMDBSession::NewL(KCDVersion1_2);
       
   132 #else
       
   133 	CMDBSession *cmdbSession = CMDBSession::NewL(KCDVersion1_1);
       
   134 #endif
       
   135 	CleanupStack::PushL(cmdbSession); 
       
   136 	
       
   137 	CMDBRecordSet<CCDConnectionPrefsRecord> *recordSet1 = new (ELeave) CMDBRecordSet<CCDConnectionPrefsRecord>(KCDTIdConnectionPrefsRecord);
       
   138 	CleanupStack::PushL(recordSet1);
       
   139 	TRAPD(loadErr, recordSet1->LoadL(*cmdbSession));
       
   140 	if(loadErr == KErrNone)
       
   141 		{
       
   142 		recordSet1->DeleteL(*cmdbSession);
       
   143 		}
       
   144 	CleanupStack::PopAndDestroy(recordSet1);
       
   145 		
       
   146 	CMDBRecordSet<CCDIAPRecord> *recordSet2 = new(ELeave) CMDBRecordSet<CCDIAPRecord>(KCDTIdIAPRecord);
       
   147 	CleanupStack::PushL(recordSet2);
       
   148 	
       
   149 	TRAP(loadErr, recordSet2->LoadL(*cmdbSession));
       
   150 	if(loadErr == KErrNone)
       
   151 		{
       
   152 		recordSet2->DeleteL(*cmdbSession);
       
   153 		}
       
   154 		
       
   155 	CleanupStack::PopAndDestroy(recordSet2);
       
   156 	CleanupStack::PopAndDestroy(cmdbSession);
       
   157 	}
       
   158 	
       
   159 TVerdict CConnectionPrefValidationTestBase::doTestStepPreambleL()
       
   160 	{
       
   161 	SetTestStepResult(EFail);	
       
   162 	INFO_PRINTF1(_L("I am in doTestStepPreambleL() and deleting all connection preferences record"));
       
   163 	
       
   164 	deleteAllL();
       
   165 		
       
   166 	SetTestStepResult(EPass);
       
   167 	return TestStepResult();
       
   168 	}
       
   169 
       
   170 TVerdict CConnectionPrefValidationTestBase::doTestStepPostambleL()
       
   171 	{
       
   172 	deleteAllL();
       
   173 	return TestStepResult();
       
   174 	}
       
   175 
       
   176 //----------------------------------------------------------------------------------------------------------------
       
   177 CCommsdat100Step::CCommsdat100Step()
       
   178 /**
       
   179  * Constructor
       
   180  */
       
   181 	{
       
   182 	SetTestStepName(KCommsdat100Step);                                                                                           
       
   183 	}
       
   184 
       
   185 TVerdict CCommsdat100Step::doTestStepL()
       
   186 /**
       
   187  * @return - TVerdict code
       
   188  * The IAP record, conn pref record refers to, has to have a valid id, hence less 
       
   189  * than KCDMaxRecords.
       
   190  */
       
   191 	{
       
   192     SetTestStepResult(EFail);	
       
   193 	INFO_PRINTF1(_L("Testing validation for connection preferences in CCommsdat100Step::doTestStepL() "));
       
   194 	
       
   195 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
   196 	CMDBSession *cmdbSession = CMDBSession::NewL(KCDVersion1_2);
       
   197 #else
       
   198 	CMDBSession *cmdbSession = CMDBSession::NewL(KCDVersion1_1);
       
   199 #endif
       
   200 	CleanupStack::PushL(cmdbSession); 
       
   201 	
       
   202 	CCDConnectionPrefsRecord *cpRecord = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord);
       
   203 	CleanupStack::PushL(cpRecord);
       
   204 	
       
   205 	cpRecord->SetRecordId(KConnPrefRecordId );
       
   206 	cpRecord->iDefaultIAP = KCDMaxRecords;
       
   207 	TRAPD(storeErr, cpRecord->StoreL(*cmdbSession));
       
   208 	
       
   209 	if(storeErr == KErrNotFound)
       
   210 		{
       
   211 		SetTestStepResult(EPass);
       
   212 		}
       
   213 	
       
   214 	CleanupStack::PopAndDestroy(cpRecord);
       
   215 	CleanupStack::PopAndDestroy(cmdbSession);
       
   216         
       
   217 	return TestStepResult();
       
   218 	}
       
   219 	
       
   220 //----------------------------------------------------------------------------------------------------------------
       
   221 CCommsdat101Step::CCommsdat101Step()
       
   222 /**
       
   223  * Constructor
       
   224  */
       
   225 	{
       
   226 	SetTestStepName(KCommsdat101Step);                                                                                           
       
   227 	}
       
   228 
       
   229 TVerdict CCommsdat101Step::doTestStepL()
       
   230 /**
       
   231  * @return - TVerdict code
       
   232  * The ranking of conn pref record must be eiher 1 or 2, testing with an invalid value
       
   233  */
       
   234 	{
       
   235     SetTestStepResult(EFail);	
       
   236 	INFO_PRINTF1(_L("Testing validation for connection preferences in CCommsdat101Step::doTestStepL() "));
       
   237 	
       
   238 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
   239 	CMDBSession *cmdbSession = CMDBSession::NewL(KCDVersion1_2);
       
   240 #else
       
   241 	CMDBSession *cmdbSession = CMDBSession::NewL(KCDVersion1_1);
       
   242 #endif
       
   243 	CleanupStack::PushL(cmdbSession); 
       
   244 	
       
   245 	CCDConnectionPrefsRecord *cpRecord = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord);
       
   246 	CleanupStack::PushL(cpRecord);
       
   247 	
       
   248 	cpRecord->SetRecordId(KConnPrefRecordId);
       
   249 	cpRecord->iDefaultIAP = 1; // An arbitrary but still valid IAP record id
       
   250 	cpRecord->iRanking = 3;    // Invalid value, should cause KErrOverflow
       
   251 	TRAPD(storeErr, cpRecord->StoreL(*cmdbSession));
       
   252 	INFO_PRINTF2(_L("store returns %d"), storeErr);
       
   253 	
       
   254 	if(storeErr == KErrOverflow)
       
   255 		{
       
   256 		SetTestStepResult(EPass);
       
   257 		}
       
   258 	
       
   259 	CleanupStack::PopAndDestroy(cpRecord);
       
   260 	CleanupStack::PopAndDestroy(cmdbSession);
       
   261     
       
   262 	return TestStepResult();
       
   263 	}
       
   264 	
       
   265 //----------------------------------------------------------------------------------------------------------------
       
   266 CCommsdat102Step::CCommsdat102Step()
       
   267 /**
       
   268  * Constructor
       
   269  */
       
   270 	{
       
   271 	SetTestStepName(KCommsdat102Step);                                                                                           
       
   272 	}
       
   273 
       
   274 TVerdict CCommsdat102Step::doTestStepL()
       
   275 /**
       
   276  * @return - TVerdict code
       
   277  * Conn pref records with a rank of 2 are not permitted to be incoming
       
   278  */
       
   279 	{
       
   280     SetTestStepResult(EFail);	
       
   281 	INFO_PRINTF1(_L("Testing validation for connection preferences in CCommsdat102Step::doTestStepL() "));
       
   282 	
       
   283 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
   284 	CMDBSession *cmdbSession = CMDBSession::NewL(KCDVersion1_2);
       
   285 #else
       
   286 	CMDBSession *cmdbSession = CMDBSession::NewL(KCDVersion1_1);
       
   287 #endif
       
   288 	CleanupStack::PushL(cmdbSession); 
       
   289 	
       
   290 	CCDConnectionPrefsRecord *cpRecord = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord);
       
   291 	CleanupStack::PushL(cpRecord);
       
   292 	
       
   293 	cpRecord->SetRecordId(KConnPrefRecordId);
       
   294 	cpRecord->iDefaultIAP = 1;  // An arbitrary, but valiad IAP record id
       
   295 	cpRecord->iRanking = 2;     // A invalid ranking for incoming connection
       
   296 	cpRecord->iDirection = ECommDbConnectionDirectionIncoming;
       
   297 	TRAPD(storeErr, cpRecord->StoreL(*cmdbSession));
       
   298 	
       
   299 	if(storeErr == KErrNotSupported)
       
   300 		{
       
   301 		SetTestStepResult(EPass);
       
   302 		}
       
   303 	
       
   304 	CleanupStack::PopAndDestroy(cpRecord);
       
   305 	CleanupStack::PopAndDestroy(cmdbSession);
       
   306     
       
   307 	return TestStepResult();
       
   308 	}
       
   309 	
       
   310 //----------------------------------------------------------------------------------------------------------------
       
   311 CCommsdat103Step::CCommsdat103Step()
       
   312 /**
       
   313  * Constructor
       
   314  */
       
   315 	{
       
   316 	SetTestStepName(KCommsdat103Step);                                                                                           
       
   317 	}
       
   318 
       
   319 const TInt KRanking = 1; 
       
   320 
       
   321 TVerdict CCommsdat103Step::doTestStepL()
       
   322 /**
       
   323  * @return - TVerdict code
       
   324  * Two conn pref records with the same ranking are not allowed
       
   325  */
       
   326 	{
       
   327     SetTestStepResult(EFail);	
       
   328 	INFO_PRINTF1(_L("Testing validation for connection preferences in CCommsdat103Step::doTestStepL() "));
       
   329 	
       
   330 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
   331 	CMDBSession *cmdbSession = CMDBSession::NewL(KCDVersion1_2);
       
   332 #else
       
   333 	CMDBSession *cmdbSession = CMDBSession::NewL(KCDVersion1_1);
       
   334 #endif
       
   335 	CleanupStack::PushL(cmdbSession); 
       
   336 	
       
   337 	CCDIAPRecord *iapRecord = (CCDIAPRecord*)CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord);
       
   338 	CleanupStack::PushL(iapRecord); 
       
   339 	
       
   340 	//Insert an IAP record; which will be referred by conn pref records
       
   341 	iapRecord->SetRecordId(KIAPRecordId); 
       
   342 	iapRecord->iServiceType.SetMaxLengthL(KMaxTextLength);
       
   343 	iapRecord->iServiceType= TPtrC(DIAL_OUT_ISP);
       
   344 	iapRecord->iService=1;
       
   345 	iapRecord->iBearerType.SetMaxLengthL(KMaxTextLength);
       
   346 	iapRecord->iBearerType=TPtrC(LAN_BEARER);
       
   347 	iapRecord->iBearer=1;
       
   348     
       
   349 	iapRecord->StoreL(*cmdbSession);
       
   350 	
       
   351 	CleanupStack::PopAndDestroy(iapRecord);
       
   352 	
       
   353 	CCDConnectionPrefsRecord *cpRecord1 = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord);
       
   354 	CleanupStack::PushL(cpRecord1);
       
   355 	
       
   356 	cpRecord1->SetRecordId(KConnPrefRecordId);
       
   357 	cpRecord1->iDefaultIAP = KIAPRecordId;  //A valid IAP record id 
       
   358 	cpRecord1->iRanking = KRanking;         //A valid ranking
       
   359 	cpRecord1->iDirection = ECommDbConnectionDirectionOutgoing;  //A valid direction
       
   360 	TRAPD(storeErr1, cpRecord1->StoreL(*cmdbSession));  // Should raise KErrNone
       
   361 	INFO_PRINTF2(_L("first store returns %d"), storeErr1);
       
   362 	
       
   363 	CCDConnectionPrefsRecord *cpRecord2 = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord);
       
   364 	CleanupStack::PushL(cpRecord2);
       
   365 	
       
   366 	cpRecord2->SetRecordId(KConnPrefRecordId + 1);//Just another conn pref record
       
   367 	cpRecord2->iDefaultIAP = KIAPRecordId ;       //A valid IAP record id
       
   368 	cpRecord2->iRanking = KRanking;               //Same ranking with above one; should cause KErrAlreadyExists
       
   369 	cpRecord2->iDirection = ECommDbConnectionDirectionOutgoing; // A valid direction
       
   370 	TRAPD(storeErr2, cpRecord2->StoreL(*cmdbSession));// Should raise KErrAlreadyExists
       
   371 	INFO_PRINTF2(_L("second store returns %d"), storeErr2);
       
   372 	
       
   373 	if(storeErr1 == KErrNone && storeErr2 == KErrAlreadyExists)
       
   374 		{
       
   375 		SetTestStepResult(EPass);
       
   376 		}
       
   377 	
       
   378 	CleanupStack::PopAndDestroy(cpRecord2);
       
   379 	CleanupStack::PopAndDestroy(cpRecord1);
       
   380 	CleanupStack::PopAndDestroy(cmdbSession);
       
   381     
       
   382 	return TestStepResult();
       
   383 	}
       
   384 	
       
   385 //----------------------------------------------------------------------------------------------------------------
       
   386 CCommsdat104Step::CCommsdat104Step()
       
   387 /**
       
   388  * Constructor
       
   389  */
       
   390 	{
       
   391 	SetTestStepName(KCommsdat104Step);                                                                                           
       
   392 	}
       
   393 
       
   394 TVerdict CCommsdat104Step::doTestStepL()
       
   395 /**
       
   396  * @return - TVerdict code
       
   397  * An outgoing IAP; cannot be referred as incoming
       
   398  */
       
   399 	{
       
   400     SetTestStepResult(EFail);	
       
   401 	INFO_PRINTF1(_L("Testing validation for connection preferences in CCommsdat104Step::doTestStepL() "));
       
   402 	
       
   403 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
   404 	CMDBSession *cmdbSession = CMDBSession::NewL(KCDVersion1_2);
       
   405 #else
       
   406 	CMDBSession *cmdbSession = CMDBSession::NewL(KCDVersion1_1);
       
   407 #endif
       
   408 	CleanupStack::PushL(cmdbSession); 
       
   409 	
       
   410 	CCDIAPRecord *iapRecord = (CCDIAPRecord*)CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord);
       
   411 	CleanupStack::PushL(iapRecord); 
       
   412 	
       
   413 	//Insert an outgoing IAP record
       
   414 	iapRecord->SetRecordId(KIAPRecordId);
       
   415 	iapRecord->iServiceType.SetMaxLengthL(KMaxTextLength);
       
   416 	iapRecord->iServiceType= TPtrC(DIAL_OUT_ISP);  // Outgoing IAP
       
   417 	TRAPD(storeErr1, iapRecord->StoreL(*cmdbSession)); //Should return KErrNone
       
   418 	
       
   419 	CCDConnectionPrefsRecord *cpRecord = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord);
       
   420 	CleanupStack::PushL(cpRecord);
       
   421 	
       
   422 	cpRecord->SetRecordId(KConnPrefRecordId);
       
   423 	cpRecord->iRanking = 1;    //A valid ranking
       
   424 	cpRecord->iDirection = ECommDbConnectionDirectionIncoming; //Should cause KErrArgument
       
   425 	cpRecord->iDefaultIAP = KIAPRecordId;  //The IAP record inserted above
       
   426 	cpRecord->iBearerSet = KCommDbBearerCSD;  //Type of bearer
       
   427 	TRAPD(storeErr2, cpRecord->StoreL(*cmdbSession)); //Should return KErrArgument
       
   428 	
       
   429 	if(storeErr1 == KErrNone && storeErr2 == KErrArgument)
       
   430 		{
       
   431 		SetTestStepResult(EPass);
       
   432 		}
       
   433 	
       
   434 	CleanupStack::PopAndDestroy(cpRecord);
       
   435 	CleanupStack::PopAndDestroy(iapRecord);
       
   436 	CleanupStack::PopAndDestroy(cmdbSession);
       
   437     
       
   438 	return TestStepResult();
       
   439 	}
       
   440 	
       
   441 //----------------------------------------------------------------------------------------------------------------
       
   442 CCommsdat105Step::CCommsdat105Step()
       
   443 /**
       
   444  * Constructor
       
   445  */
       
   446 	{
       
   447 	SetTestStepName(KCommsdat105Step);                                                                                           
       
   448 	}
       
   449 
       
   450 TVerdict CCommsdat105Step::doTestStepL()
       
   451 /**
       
   452  * @return - TVerdict code
       
   453  * A valid combination: an outgoing IAP is referred with an outgoing direction 
       
   454  */
       
   455 	{
       
   456     SetTestStepResult(EFail);	
       
   457 	INFO_PRINTF1(_L("Testing validation for connection preferences in CCommsdat105Step::doTestStepL() "));
       
   458 	
       
   459 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
   460 	CMDBSession *cmdbSession = CMDBSession::NewL(KCDVersion1_2);
       
   461 #else
       
   462 	CMDBSession *cmdbSession = CMDBSession::NewL(KCDVersion1_1);
       
   463 #endif
       
   464 	CleanupStack::PushL(cmdbSession); 
       
   465 	
       
   466 	CCDIAPRecord *iapRecord = (CCDIAPRecord*)CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord);
       
   467 	CleanupStack::PushL(iapRecord);
       
   468 	
       
   469 	// An outgoing IAP record is inserted
       
   470 	iapRecord->SetRecordId(KIAPRecordId);
       
   471 	iapRecord->iServiceType.SetMaxLengthL(KMaxTextLength);
       
   472 	iapRecord->iServiceType= TPtrC(DIAL_OUT_ISP);
       
   473 	iapRecord->iService=1;
       
   474 	iapRecord->iBearerType.SetMaxLengthL(KMaxTextLength);
       
   475 	iapRecord->iBearerType=TPtrC(LAN_BEARER);
       
   476 	iapRecord->iBearer=1;
       
   477 	TRAPD(storeErr1, iapRecord->StoreL(*cmdbSession)); //Should return KErrNone
       
   478 	
       
   479 	CCDConnectionPrefsRecord *cpRecord = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord);
       
   480 	CleanupStack::PushL(cpRecord);
       
   481 	
       
   482 	cpRecord->SetRecordId(KConnPrefRecordId);
       
   483 	cpRecord->iRanking = 1;     // A valid ranking
       
   484 	cpRecord->iDirection = ECommDbConnectionDirectionOutgoing;  //A valid direction
       
   485 	cpRecord->iDefaultIAP = KIAPRecordId;  //IAP record inserted above
       
   486 	cpRecord->iBearerSet = KCommDbBearerLAN; // A valid bearer type
       
   487 	TRAPD(storeErr2, cpRecord->StoreL(*cmdbSession)); //Should return KErrNone
       
   488 	
       
   489 	if(storeErr1 == KErrNone && storeErr2 == KErrNone)
       
   490 		{
       
   491 		SetTestStepResult(EPass);
       
   492 		}
       
   493 	
       
   494 	CleanupStack::PopAndDestroy(cpRecord);
       
   495 	CleanupStack::PopAndDestroy(iapRecord);
       
   496 	CleanupStack::PopAndDestroy(cmdbSession);
       
   497     
       
   498 	return TestStepResult();
       
   499 	}
       
   500 	
       
   501 //----------------------------------------------------------------------------------------------------------------
       
   502 CCommsdat106Step::CCommsdat106Step()
       
   503 /**
       
   504  * Constructor
       
   505  */
       
   506 	{
       
   507 	SetTestStepName(KCommsdat106Step);                                                                                           
       
   508 	}
       
   509 
       
   510 TVerdict CCommsdat106Step::doTestStepL()
       
   511 /**
       
   512  * @return - TVerdict code
       
   513  Test whether iDefaultIAP accepts zero as a valid value, since phones get shipped without any predefined IAPs
       
   514  */
       
   515 	{
       
   516     SetTestStepResult(EFail);	
       
   517 	INFO_PRINTF1(_L("Testing validation for connection preferences in CCommsdat106Step::doTestStepL() "));
       
   518 	
       
   519 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
   520 	CMDBSession *cmdbSession = CMDBSession::NewL(KCDVersion1_2);
       
   521 #else
       
   522 	CMDBSession *cmdbSession = CMDBSession::NewL(KCDVersion1_1);
       
   523 #endif
       
   524 	CleanupStack::PushL(cmdbSession); 
       
   525 	
       
   526 	CCDConnectionPrefsRecord *cpRecord = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord);
       
   527 	CleanupStack::PushL(cpRecord);
       
   528 	
       
   529 	//Even if the defaultIAP field won't contain anything an IAP has to be inserted because this will
       
   530 	//be the base of the link layer AP generation - CommsDat will search for an IAP based on the
       
   531 	//serviceType and Direction settings in the ConnPref record.
       
   532 	CCDIAPRecord *iapRecord = (CCDIAPRecord*)CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord);
       
   533 	CleanupStack::PushL(iapRecord);
       
   534 	
       
   535 	// An outgoing IAP record is inserted which satisfies the settings of the ConnPref record
       
   536 	iapRecord->SetRecordId(KIAPRecordId);
       
   537 	iapRecord->iServiceType.SetMaxLengthL(KMaxTextLength);
       
   538 	iapRecord->iServiceType= TPtrC(DIAL_OUT_ISP);
       
   539 	iapRecord->iService=1;
       
   540 	iapRecord->iBearerType.SetMaxLengthL(KMaxTextLength);
       
   541 	iapRecord->iBearerType=TPtrC(LAN_BEARER);
       
   542 	iapRecord->iBearer=1;
       
   543 	TRAPD(storeErr, iapRecord->StoreL(*cmdbSession)); //Should return KErrNone
       
   544 	
       
   545 	if (storeErr == KErrNone)
       
   546 		{
       
   547 		cpRecord->SetRecordId(KConnPrefRecordId );
       
   548 		cpRecord->iDefaultIAP = 0;
       
   549 		cpRecord->iDirection.SetL(ECommDbConnectionDirectionOutgoing);
       
   550 		cpRecord->iBearerSet.SetL(KCommDbBearerCSD);
       
   551 		cpRecord->iRanking = 1;     // A valid ranking
       
   552 				
       
   553 		TRAP(storeErr, cpRecord->StoreL(*cmdbSession));
       
   554 		
       
   555 		if(storeErr == KErrNone)
       
   556 			{
       
   557 			SetTestStepResult(EPass);
       
   558 			}
       
   559 		}
       
   560 	CleanupStack::PopAndDestroy(iapRecord);
       
   561 	CleanupStack::PopAndDestroy(cpRecord);
       
   562 	CleanupStack::PopAndDestroy(cmdbSession);
       
   563         
       
   564 	return TestStepResult();
       
   565 	}
       
   566 
       
   567 //----------------------------------------------------------------------------------------------------------------
       
   568 CCommsdat107Step::CCommsdat107Step()
       
   569 /**
       
   570  * Constructor
       
   571  */
       
   572 	{
       
   573 	SetTestStepName(KCommsdat107Step);
       
   574 	}
       
   575 
       
   576 TVerdict CCommsdat107Step::doTestStepL()
       
   577 /**
       
   578  * @return - TVerdict code
       
   579  Test whether iDefaultIAP accepts zero as a valid value, since phones get shipped without any predefined IAPs
       
   580  */
       
   581 	{
       
   582     SetTestStepResult(EFail);	
       
   583 	INFO_PRINTF1(_L("Modifying a link value to 0 in CCommsdat107Step::doTestStepL() "));
       
   584 	
       
   585 	
       
   586 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
   587 	CMDBSession *cmdbSession = CMDBSession::NewL(KCDVersion1_2);
       
   588 #else
       
   589 	CMDBSession *cmdbSession = CMDBSession::NewL(KCDVersion1_1);
       
   590 #endif
       
   591 	CleanupStack::PushL(cmdbSession); 
       
   592 	
       
   593 	CCDVPNServiceRecord* vpnRec = static_cast<CCDVPNServiceRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdVPNServiceRecord));
       
   594     CleanupStack::PushL(vpnRec);
       
   595     
       
   596     vpnRec->SetRecordId(2);
       
   597     vpnRec->LoadL(*cmdbSession);
       
   598 	
       
   599     vpnRec->iServiceIAP = 0;
       
   600     
       
   601     vpnRec->ModifyL(*cmdbSession);
       
   602     
       
   603     vpnRec->LoadL(*cmdbSession);
       
   604     
       
   605     //this record is stored by ced without the homeIAP field.
       
   606     CCDVPNServiceRecord* vpnRec01 = static_cast<CCDVPNServiceRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdVPNServiceRecord));
       
   607     CleanupStack::PushL(vpnRec01);
       
   608     
       
   609     vpnRec01->SetRecordId(4);
       
   610     vpnRec01->LoadL(*cmdbSession);
       
   611     
       
   612     //at this point the stored and the modified vpn service records should have and initial
       
   613     //0 value in their homeIAP fields. The NotZero flag of the fields should be false when 
       
   614     //reading from the DB.
       
   615     
       
   616     if (NULL == vpnRec01->iServiceIAP &&
       
   617     	NULL == vpnRec->iServiceIAP &&
       
   618     	NULL == (vpnRec01->ElementId() & KCDNotNullFlag) &&
       
   619     	NULL == (vpnRec->ElementId() & KCDNotNullFlag) )
       
   620     	{
       
   621     	SetTestStepResult(EPass);
       
   622     	}
       
   623     
       
   624     CleanupStack::PopAndDestroy(vpnRec01);
       
   625     CleanupStack::PopAndDestroy(vpnRec);
       
   626 	CleanupStack::PopAndDestroy(cmdbSession);
       
   627         
       
   628 	return TestStepResult();
       
   629 	}
       
   630 
       
   631 
       
   632 
       
   633 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
   634 
       
   635 CCommsdat332Step::CCommsdat332Step()
       
   636 /**
       
   637  * Constructor
       
   638  */
       
   639 	{
       
   640 	SetTestStepName(KCommsdat332Step);                                                                                           
       
   641 	}
       
   642 
       
   643 CCommsdat332Step::~CCommsdat332Step()
       
   644 /**
       
   645  * Destructor
       
   646  */
       
   647 	{
       
   648 	delete iCDSession_v11;
       
   649 	delete iCDSession_vLatest;
       
   650 	}
       
   651 
       
   652 TVerdict CCommsdat332Step::doTestStepPreambleL()
       
   653 	{
       
   654 	SetTestStepResult(EPass);
       
   655 	return TestStepResult();
       
   656 	}
       
   657 
       
   658 TVerdict CCommsdat332Step::doTestStepPostambleL()
       
   659 	{
       
   660 	return TestStepResult();
       
   661 	}
       
   662 
       
   663 void CCommsdat332Step::CreateSessionsL()
       
   664 	{
       
   665     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
   666     iCDSession_vLatest = NULL;
       
   667 	}
       
   668 
       
   669 
       
   670 TVerdict CCommsdat332Step::doTestStepL()
       
   671 /**
       
   672  * @return - TVerdict code
       
   673  * Modify the name of the 1st ConnPref record. ModifyL is called through a 
       
   674  * field container.
       
   675  */
       
   676 	{
       
   677     SetTestStepResult(EFail);
       
   678     CreateSessionsL();
       
   679     
       
   680     _LIT(KConnPrefName, "Modified ConnPref Name");
       
   681     
       
   682     CMDBField<TDesC>* connPrefName = new(ELeave)CMDBField<TDesC>(KCDTIdConnectionPrefsRecord | KCDTIdRecordName);
       
   683     CleanupStack::PushL(connPrefName);
       
   684     connPrefName->SetRecordId(1);
       
   685     
       
   686     connPrefName->SetMaxLengthL(KConnPrefName().Length());
       
   687     connPrefName->SetL(KConnPrefName);
       
   688     
       
   689     connPrefName->ModifyL(*iCDSession_v11);
       
   690 	
       
   691     CleanupStack::PopAndDestroy(connPrefName);
       
   692     
       
   693     CMDBField<TDesC>* connPrefName1 = new(ELeave)CMDBField<TDesC>(KCDTIdConnectionPrefsRecord | KCDTIdRecordName);
       
   694     CleanupStack::PushL(connPrefName1);
       
   695     connPrefName1->SetRecordId(1);
       
   696     
       
   697     connPrefName1->LoadL(*iCDSession_v11);
       
   698 	
       
   699     TPtrC nameField(*connPrefName1);
       
   700     
       
   701     if (0 == nameField.Compare(KConnPrefName))
       
   702     	{
       
   703     	SetTestStepResult(EPass);
       
   704     	}
       
   705     
       
   706     CleanupStack::PopAndDestroy(connPrefName1);
       
   707     
       
   708 	return TestStepResult();
       
   709 	}
       
   710 
       
   711 //----------------------------------------------------------------------------------------------------------------
       
   712 CCommsdat333Step::CCommsdat333Step()
       
   713 /**
       
   714  * Constructor
       
   715  */
       
   716 	{
       
   717 	SetTestStepName(KCommsdat333Step);                                                                                           
       
   718 	}
       
   719 
       
   720 CCommsdat333Step::~CCommsdat333Step()
       
   721 /**
       
   722  * Destructor
       
   723  */
       
   724 	{
       
   725 	delete iCDSession_v11;
       
   726 	delete iCDSession_vLatest;
       
   727 	}
       
   728 
       
   729 TVerdict CCommsdat333Step::doTestStepPreambleL()
       
   730 	{
       
   731 	SetTestStepResult(EPass);
       
   732 	return TestStepResult();
       
   733 	}
       
   734 
       
   735 TVerdict CCommsdat333Step::doTestStepPostambleL()
       
   736 	{
       
   737 	return TestStepResult();
       
   738 	}
       
   739 
       
   740 void CCommsdat333Step::CreateSessionsL()
       
   741 	{
       
   742     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
   743     iCDSession_vLatest = NULL;
       
   744 	}
       
   745 
       
   746 
       
   747 TVerdict CCommsdat333Step::doTestStepL()
       
   748 /**
       
   749  * @return - TVerdict code
       
   750  * Modify the name of the 1st ConnPref record. ModifyL is called through a 
       
   751  * record container.
       
   752  */
       
   753 	{
       
   754     SetTestStepResult(EFail);
       
   755     CreateSessionsL();
       
   756     
       
   757     _LIT(KConnPrefName, "DefaultRecordName-1");
       
   758     
       
   759     CCDConnectionPrefsRecord* connPrefRec = static_cast<CCDConnectionPrefsRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord));
       
   760     CleanupStack::PushL(connPrefRec);
       
   761     
       
   762     connPrefRec->SetRecordId(1);
       
   763     
       
   764     connPrefRec->iRecordName.SetMaxLengthL(KConnPrefName().Length());
       
   765     connPrefRec->iRecordName.SetL(KConnPrefName);
       
   766     
       
   767     connPrefRec->ModifyL(*iCDSession_v11);
       
   768     
       
   769     CleanupStack::PopAndDestroy(connPrefRec);
       
   770     
       
   771     CMDBField<TDesC>* connPrefName1 = new(ELeave)CMDBField<TDesC>(KCDTIdConnectionPrefsRecord | KCDTIdRecordName);
       
   772     CleanupStack::PushL(connPrefName1);
       
   773     connPrefName1->SetRecordId(1);
       
   774     
       
   775     connPrefName1->LoadL(*iCDSession_v11);
       
   776 	
       
   777     TPtrC nameField(*connPrefName1);
       
   778     
       
   779     if (0 == nameField.Compare(KConnPrefName))
       
   780     	{
       
   781     	SetTestStepResult(EPass);
       
   782     	}
       
   783     
       
   784     CleanupStack::PopAndDestroy(connPrefName1);
       
   785     
       
   786 	return TestStepResult();
       
   787 	}
       
   788 
       
   789 //----------------------------------------------------------------------------------------------------------------
       
   790 CCommsdat334Step::CCommsdat334Step()
       
   791 /**
       
   792  * Constructor
       
   793  */
       
   794 	{
       
   795 	SetTestStepName(KCommsdat334Step);                                                                                           
       
   796 	}
       
   797 
       
   798 CCommsdat334Step::~CCommsdat334Step()
       
   799 /**
       
   800  * Destructor
       
   801  */
       
   802 	{
       
   803 	delete iCDSession_v11;
       
   804 	delete iCDSession_vLatest;
       
   805 	}
       
   806 
       
   807 TVerdict CCommsdat334Step::doTestStepPreambleL()
       
   808 	{
       
   809 	SetTestStepResult(EPass);
       
   810 	return TestStepResult();
       
   811 	}
       
   812 
       
   813 TVerdict CCommsdat334Step::doTestStepPostambleL()
       
   814 	{
       
   815 	return TestStepResult();
       
   816 	}
       
   817 
       
   818 void CCommsdat334Step::CreateSessionsL()
       
   819 	{
       
   820     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
   821 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
   822     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
   823 #else
       
   824     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
   825 #endif
       
   826 	}
       
   827 
       
   828 
       
   829 TVerdict CCommsdat334Step::doTestStepL()
       
   830 /**
       
   831  * @return - TVerdict code
       
   832  * Modify the DialogPref field of the 1st ConnPref record. 
       
   833  * As a result _NOT_ the prompt field of the ipproto Tier record has to be modified
       
   834  * but instead the full TMDBElementId of the connpref record should be stored
       
   835  * in the cprConfig field of the generated ipproto AP. 
       
   836  * 
       
   837  * ModifyL is called through a record container.
       
   838  */
       
   839 	{
       
   840     SetTestStepResult(EFail);
       
   841     CreateSessionsL();
       
   842     
       
   843     CCDConnectionPrefsRecord* connPrefRec = static_cast<CCDConnectionPrefsRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord));
       
   844     CleanupStack::PushL(connPrefRec);
       
   845     
       
   846     connPrefRec->SetRecordId(1);
       
   847     connPrefRec->LoadL(*iCDSession_v11);
       
   848     
       
   849     connPrefRec->iDialogPref = ECommDbDialogPrefPrompt;
       
   850     connPrefRec->ModifyL(*iCDSession_v11);
       
   851     
       
   852     CleanupStack::PopAndDestroy(connPrefRec);
       
   853     
       
   854     
       
   855     CCDConnectionPrefsRecord* connPrefRec1 = static_cast<CCDConnectionPrefsRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord));
       
   856     CleanupStack::PushL(connPrefRec1);
       
   857     
       
   858     connPrefRec1->SetRecordId(1);
       
   859     connPrefRec1->LoadL(*iCDSession_v11);
       
   860     
       
   861     CMDBField<TUint32>* connPrefPromptField = &(connPrefRec1->iDialogPref);
       
   862    
       
   863     CCDAccessPointRecord* apRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord));
       
   864     CleanupStack::PushL(apRec);
       
   865     
       
   866     apRec->iCprConfig = connPrefRec1->ElementId();
       
   867     
       
   868     if ( (ECommDbDialogPrefPrompt == *connPrefPromptField) &&
       
   869     		apRec->FindL(*iCDSession_vLatest) )
       
   870     	{
       
   871     	SetTestStepResult(EPass);
       
   872     	}
       
   873     
       
   874     CleanupStack::PopAndDestroy(apRec);
       
   875     CleanupStack::PopAndDestroy(connPrefRec1);
       
   876     
       
   877     return TestStepResult();
       
   878 	}
       
   879 
       
   880 //----------------------------------------------------------------------------------------------------------------
       
   881 CCommsdat335Step::CCommsdat335Step()/**
       
   882  * Constructor
       
   883  */
       
   884 	{
       
   885 	SetTestStepName(KCommsdat335Step);                                                                                           
       
   886 	}
       
   887 
       
   888 CCommsdat335Step::~CCommsdat335Step()
       
   889 /**
       
   890  * Destructor
       
   891  */
       
   892 	{
       
   893 	delete iCDSession_v11;
       
   894 	delete iCDSession_vLatest;
       
   895 	}
       
   896 
       
   897 TVerdict CCommsdat335Step::doTestStepPreambleL()
       
   898 	{
       
   899 	SetTestStepResult(EPass);
       
   900 	return TestStepResult();
       
   901 	}
       
   902 
       
   903 TVerdict CCommsdat335Step::doTestStepPostambleL()
       
   904 	{
       
   905 	return TestStepResult();
       
   906 	}
       
   907 
       
   908 void CCommsdat335Step::CreateSessionsL()
       
   909 	{
       
   910     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
   911 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
   912     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
   913 #else
       
   914     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
   915 #endif
       
   916 	}
       
   917 
       
   918 
       
   919 TVerdict CCommsdat335Step::doTestStepL()
       
   920 /**
       
   921  * @return - TVerdict code
       
   922  * Modify the DialogPref field of the 1st ConnPref record. ModifyL is called through a 
       
   923  * field container.
       
   924  */
       
   925 	{
       
   926     SetTestStepResult(EFail);
       
   927     CreateSessionsL();
       
   928     
       
   929     CMDBField<TUint32>* connPrefPromptField = new(ELeave)CMDBField<TUint32>(KCDTIdDialogPref);
       
   930     CleanupStack::PushL(connPrefPromptField);
       
   931     
       
   932     connPrefPromptField->SetRecordId(1);
       
   933     connPrefPromptField->LoadL(*iCDSession_v11);
       
   934     
       
   935     *connPrefPromptField = ECommDbDialogPrefDoNotPrompt;
       
   936     connPrefPromptField->ModifyL(*iCDSession_v11);
       
   937     
       
   938     CleanupStack::PopAndDestroy(connPrefPromptField);
       
   939     
       
   940     
       
   941     CCDConnectionPrefsRecord* connPrefRec1 = static_cast<CCDConnectionPrefsRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord));
       
   942     CleanupStack::PushL(connPrefRec1);
       
   943     
       
   944     connPrefRec1->SetRecordId(1);
       
   945     connPrefRec1->LoadL(*iCDSession_v11);
       
   946     
       
   947     CCDAccessPointRecord* apRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord));
       
   948     CleanupStack::PushL(apRec);
       
   949     
       
   950     apRec->iCprConfig.SetL(connPrefRec1->iDefaultIAP);
       
   951     apRec->FindL(*iCDSession_vLatest);
       
   952     
       
   953     CMDBField<TUint32>* connPrefPromptField1 = &(connPrefRec1->iDialogPref);
       
   954     
       
   955     if ( (ECommDbDialogPrefDoNotPrompt == *connPrefPromptField1) &&
       
   956     		apRec->iCprConfig == apRec->iCustomSelectionPolicy)
       
   957     	{
       
   958     	SetTestStepResult(EPass);
       
   959     	}
       
   960     
       
   961     CleanupStack::PopAndDestroy(apRec);
       
   962     CleanupStack::PopAndDestroy(connPrefRec1);
       
   963     
       
   964     return TestStepResult();
       
   965 	}
       
   966 
       
   967 //----------------------------------------------------------------------------------------------------------------
       
   968 CCommsdat336Step::CCommsdat336Step()/**
       
   969  * Constructor
       
   970  */
       
   971 	{
       
   972 	SetTestStepName(KCommsdat336Step);                                                                                           
       
   973 	}
       
   974 
       
   975 CCommsdat336Step::~CCommsdat336Step()
       
   976 /**
       
   977  * Destructor
       
   978  */
       
   979 	{
       
   980 	delete iCDSession_v11;
       
   981 	delete iCDSession_vLatest;
       
   982 	}
       
   983 
       
   984 TVerdict CCommsdat336Step::doTestStepPreambleL()
       
   985 	{
       
   986 	SetTestStepResult(EPass);
       
   987 	return TestStepResult();
       
   988 	}
       
   989 
       
   990 TVerdict CCommsdat336Step::doTestStepPostambleL()
       
   991 	{
       
   992 	return TestStepResult();
       
   993 	}
       
   994 
       
   995 void CCommsdat336Step::CreateSessionsL()
       
   996 	{
       
   997     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
   998 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
   999     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  1000 #else
       
  1001     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  1002 #endif
       
  1003 	}
       
  1004 
       
  1005 
       
  1006 TVerdict CCommsdat336Step::doTestStepL()
       
  1007 /**
       
  1008  * @return - TVerdict code
       
  1009  * Modify the BearerSet field of the 1st ConnPref record. ModifyL is called through a 
       
  1010  * record container.
       
  1011  */
       
  1012 	{
       
  1013     SetTestStepResult(EFail);
       
  1014     CreateSessionsL();
       
  1015     
       
  1016     CCDConnectionPrefsRecord* connPrefRec = static_cast<CCDConnectionPrefsRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord));
       
  1017     CleanupStack::PushL(connPrefRec);
       
  1018     
       
  1019     connPrefRec->SetRecordId(1);
       
  1020     connPrefRec->LoadL(*iCDSession_v11);
       
  1021     
       
  1022     connPrefRec->iBearerSet = KCommDbBearerWLAN;
       
  1023     
       
  1024     connPrefRec->ModifyL(*iCDSession_v11);
       
  1025     
       
  1026     CleanupStack::PopAndDestroy(connPrefRec);
       
  1027     
       
  1028     
       
  1029     CCDConnectionPrefsRecord* connPrefRec1 = static_cast<CCDConnectionPrefsRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord));
       
  1030     CleanupStack::PushL(connPrefRec1);
       
  1031     
       
  1032     connPrefRec1->SetRecordId(1);
       
  1033     connPrefRec1->LoadL(*iCDSession_v11);
       
  1034     
       
  1035     if (KCommDbBearerWLAN == connPrefRec1->iBearerSet)
       
  1036     	{
       
  1037     	SetTestStepResult(EPass);
       
  1038     	}
       
  1039     
       
  1040     CleanupStack::PopAndDestroy(connPrefRec1);    
       
  1041     
       
  1042     return TestStepResult();
       
  1043 	}
       
  1044 
       
  1045 //----------------------------------------------------------------------------------------------------------------
       
  1046 CCommsdat337Step::CCommsdat337Step()/**
       
  1047  * Constructor
       
  1048  */
       
  1049 	{
       
  1050 	SetTestStepName(KCommsdat337Step);                                                                                           
       
  1051 	}
       
  1052 
       
  1053 CCommsdat337Step::~CCommsdat337Step()
       
  1054 /**
       
  1055  * Destructor
       
  1056  */
       
  1057 	{
       
  1058 	delete iCDSession_v11;
       
  1059 	delete iCDSession_vLatest;
       
  1060 	}
       
  1061 
       
  1062 TVerdict CCommsdat337Step::doTestStepPreambleL()
       
  1063 	{
       
  1064 	SetTestStepResult(EPass);
       
  1065 	return TestStepResult();
       
  1066 	}
       
  1067 
       
  1068 TVerdict CCommsdat337Step::doTestStepPostambleL()
       
  1069 	{
       
  1070 	return TestStepResult();
       
  1071 	}
       
  1072 
       
  1073 void CCommsdat337Step::CreateSessionsL()
       
  1074 	{
       
  1075     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  1076 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  1077     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  1078 #else
       
  1079     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  1080 #endif
       
  1081 	}
       
  1082 
       
  1083 
       
  1084 TVerdict CCommsdat337Step::doTestStepL()
       
  1085 /**
       
  1086  * @return - TVerdict code
       
  1087  * Modify the BearerSet field of the 1st ConnPref record. ModifyL is called through a 
       
  1088  * field container.
       
  1089  */
       
  1090 	{
       
  1091     SetTestStepResult(EFail);
       
  1092     CreateSessionsL();
       
  1093     
       
  1094     CMDBField<TUint32>* connPrefBearerField = new(ELeave)CMDBField<TUint32>(KCDTIdBearerSet);
       
  1095     CleanupStack::PushL(connPrefBearerField);
       
  1096     
       
  1097     connPrefBearerField->SetRecordId(1);    
       
  1098     *connPrefBearerField = KCommDbBearerPAN;
       
  1099     
       
  1100     connPrefBearerField->ModifyL(*iCDSession_v11);
       
  1101     
       
  1102     CleanupStack::PopAndDestroy(connPrefBearerField);
       
  1103     
       
  1104     
       
  1105     CMDBField<TUint32>* connPrefBearerField1 = new(ELeave)CMDBField<TUint32>(KCDTIdBearerSet);
       
  1106     CleanupStack::PushL(connPrefBearerField1);
       
  1107     
       
  1108     connPrefBearerField1->SetRecordId(1);
       
  1109     connPrefBearerField1->LoadL(*iCDSession_v11);
       
  1110     
       
  1111     if (KCommDbBearerPAN == *connPrefBearerField1)
       
  1112     	{
       
  1113     	SetTestStepResult(EPass);
       
  1114     	}
       
  1115     
       
  1116     CleanupStack::PopAndDestroy(connPrefBearerField1);    
       
  1117     
       
  1118     return TestStepResult();
       
  1119 	}
       
  1120 
       
  1121 //----------------------------------------------------------------------------------------------------------------
       
  1122 //changing the default IAP field in the ConnPref rec
       
  1123 CCommsdat338Step::CCommsdat338Step()/**
       
  1124  * Constructor
       
  1125  */
       
  1126 	{
       
  1127 	SetTestStepName(KCommsdat338Step);
       
  1128 	}
       
  1129 
       
  1130 CCommsdat338Step::~CCommsdat338Step()
       
  1131 /**
       
  1132  * Destructor
       
  1133  */
       
  1134 	{
       
  1135 	delete iCDSession_v11;
       
  1136 	delete iCDSession_vLatest;
       
  1137 	}
       
  1138 
       
  1139 TVerdict CCommsdat338Step::doTestStepPreambleL()
       
  1140 	{
       
  1141 	SetTestStepResult(EPass);
       
  1142 	return TestStepResult();
       
  1143 	}
       
  1144 
       
  1145 TVerdict CCommsdat338Step::doTestStepPostambleL()
       
  1146 	{
       
  1147 	return TestStepResult();
       
  1148 	}
       
  1149 
       
  1150 void CCommsdat338Step::CreateSessionsL()
       
  1151 	{
       
  1152     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  1153 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  1154     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  1155 #else
       
  1156     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  1157 #endif
       
  1158 	}
       
  1159 
       
  1160 
       
  1161 TVerdict CCommsdat338Step::doTestStepL()
       
  1162 /**
       
  1163  * @return - TVerdict code
       
  1164  * Modify the IAP field of the 1st ConnPref record to a valid IAP. ModifyL is called through a 
       
  1165  * record container.
       
  1166  */
       
  1167 	{
       
  1168     SetTestStepResult(EFail);
       
  1169     CreateSessionsL();
       
  1170     
       
  1171     CCDConnectionPrefsRecord* connPrefRec = static_cast<CCDConnectionPrefsRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord));
       
  1172     CleanupStack::PushL(connPrefRec);
       
  1173     
       
  1174     connPrefRec->SetRecordId(1);
       
  1175     connPrefRec->LoadL(*iCDSession_v11);
       
  1176     
       
  1177     connPrefRec->iDefaultIAP = 1;
       
  1178     
       
  1179     connPrefRec->ModifyL(*iCDSession_v11);
       
  1180     
       
  1181     CleanupStack::PopAndDestroy(connPrefRec);  
       
  1182     
       
  1183     if (CheckConnPrefValidation(iCDSession_v11, iCDSession_vLatest))
       
  1184     	{
       
  1185     	SetTestStepResult(EPass);
       
  1186     	}
       
  1187     
       
  1188     return TestStepResult();
       
  1189 	}
       
  1190 
       
  1191 //----------------------------------------------------------------------------------------------------------------
       
  1192 //changing the default IAP field in the ConnPref rec
       
  1193 CCommsdat339Step::CCommsdat339Step()/**
       
  1194  * Constructor
       
  1195  */
       
  1196 	{
       
  1197 	SetTestStepName(KCommsdat339Step);
       
  1198 	}
       
  1199 
       
  1200 CCommsdat339Step::~CCommsdat339Step()
       
  1201 /**
       
  1202  * Destructor
       
  1203  */
       
  1204 	{
       
  1205 	delete iCDSession_v11;
       
  1206 	delete iCDSession_vLatest;
       
  1207 	}
       
  1208 
       
  1209 TVerdict CCommsdat339Step::doTestStepPreambleL()
       
  1210 	{
       
  1211 	SetTestStepResult(EPass);
       
  1212 	return TestStepResult();
       
  1213 	}
       
  1214 
       
  1215 TVerdict CCommsdat339Step::doTestStepPostambleL()
       
  1216 	{
       
  1217 	return TestStepResult();
       
  1218 	}
       
  1219 
       
  1220 void CCommsdat339Step::CreateSessionsL()
       
  1221 	{
       
  1222     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  1223 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  1224     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  1225 #else
       
  1226     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  1227 #endif
       
  1228 	}
       
  1229 
       
  1230 
       
  1231 TVerdict CCommsdat339Step::doTestStepL()
       
  1232 /**
       
  1233  * @return - TVerdict code
       
  1234  * Modify the IAP field of the 1st ConnPref record to a valid IAP. ModifyL is called through a 
       
  1235  * field container.
       
  1236  */
       
  1237 	{
       
  1238     SetTestStepResult(EFail);
       
  1239     CreateSessionsL();
       
  1240     
       
  1241     CMDBField<TInt>* defIAPField = new(ELeave)CMDBField<TInt>(KCDTIdIAPLink);
       
  1242     CleanupStack::PushL(defIAPField);
       
  1243     
       
  1244     defIAPField->SetRecordId(1);
       
  1245     *defIAPField = 3;
       
  1246     
       
  1247     defIAPField->ModifyL(*iCDSession_v11);
       
  1248     
       
  1249     CleanupStack::PopAndDestroy(defIAPField);  
       
  1250     
       
  1251     if (CheckConnPrefValidation(iCDSession_v11, iCDSession_vLatest))
       
  1252     	{
       
  1253     	SetTestStepResult(EPass);
       
  1254     	}
       
  1255     
       
  1256     return TestStepResult();
       
  1257 	}
       
  1258 
       
  1259 //----------------------------------------------------------------------------------------------------------------
       
  1260 //changing the default IAP field in the ConnPref rec
       
  1261 CCommsdat340Step::CCommsdat340Step()/**
       
  1262  * Constructor
       
  1263  */
       
  1264 	{
       
  1265 	SetTestStepName(KCommsdat340Step);
       
  1266 	}
       
  1267 
       
  1268 CCommsdat340Step::~CCommsdat340Step()
       
  1269 /**
       
  1270  * Destructor
       
  1271  */
       
  1272 	{
       
  1273 	delete iCDSession_v11;
       
  1274 	delete iCDSession_vLatest;
       
  1275 	}
       
  1276 
       
  1277 TVerdict CCommsdat340Step::doTestStepPreambleL()
       
  1278 	{
       
  1279 	SetTestStepResult(EPass);
       
  1280 	return TestStepResult();
       
  1281 	}
       
  1282 
       
  1283 TVerdict CCommsdat340Step::doTestStepPostambleL()
       
  1284 	{
       
  1285 	return TestStepResult();
       
  1286 	}
       
  1287 
       
  1288 void CCommsdat340Step::CreateSessionsL()
       
  1289 	{
       
  1290     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  1291     //I know it's a 'C' object so it's initialized to 0 but...
       
  1292     iCDSession_vLatest = NULL;
       
  1293 	}
       
  1294 
       
  1295 
       
  1296 TVerdict CCommsdat340Step::doTestStepL()
       
  1297 /**
       
  1298  * @return - TVerdict code
       
  1299  * Modify the IAP field of the 1st ConnPref record to a _NON_ valid IAP. ModifyL is called through a 
       
  1300  * record container.
       
  1301  */
       
  1302 	{
       
  1303     SetTestStepResult(EFail);
       
  1304     CreateSessionsL();
       
  1305     
       
  1306     CCDConnectionPrefsRecord* connPrefRec = static_cast<CCDConnectionPrefsRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord));
       
  1307     CleanupStack::PushL(connPrefRec);
       
  1308     
       
  1309     connPrefRec->SetRecordId(1);
       
  1310     connPrefRec->LoadL(*iCDSession_v11);
       
  1311     
       
  1312     connPrefRec->iDefaultIAP = 30;
       
  1313     
       
  1314     TRAPD(err, connPrefRec->ModifyL(*iCDSession_v11));
       
  1315     
       
  1316     if (KErrNotFound == err)
       
  1317     	{
       
  1318     	SetTestStepResult(EPass);
       
  1319     	}
       
  1320     
       
  1321     CleanupStack::PopAndDestroy(connPrefRec);
       
  1322     
       
  1323     return TestStepResult();
       
  1324 	}
       
  1325 
       
  1326 //----------------------------------------------------------------------------------------------------------------
       
  1327 //changing the default IAP field in the ConnPref rec
       
  1328 CCommsdat341Step::CCommsdat341Step()/**
       
  1329  * Constructor
       
  1330  */
       
  1331 	{
       
  1332 	SetTestStepName(KCommsdat341Step);
       
  1333 	}
       
  1334 
       
  1335 CCommsdat341Step::~CCommsdat341Step()
       
  1336 /**
       
  1337  * Destructor
       
  1338  */
       
  1339 	{
       
  1340 	delete iCDSession_v11;
       
  1341 	delete iCDSession_vLatest;
       
  1342 	}
       
  1343 
       
  1344 TVerdict CCommsdat341Step::doTestStepPreambleL()
       
  1345 	{
       
  1346 	SetTestStepResult(EPass);
       
  1347 	return TestStepResult();
       
  1348 	}
       
  1349 
       
  1350 TVerdict CCommsdat341Step::doTestStepPostambleL()
       
  1351 	{
       
  1352 	return TestStepResult();
       
  1353 	}
       
  1354 
       
  1355 void CCommsdat341Step::CreateSessionsL()
       
  1356 	{
       
  1357     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  1358     //I know it's a 'C' object so it's initialized to 0 but...
       
  1359     iCDSession_vLatest = NULL;
       
  1360 	}
       
  1361 
       
  1362 
       
  1363 TVerdict CCommsdat341Step::doTestStepL()
       
  1364 /**
       
  1365  * @return - TVerdict code
       
  1366  * Modify the IAP field of the 1st ConnPref record to a _NON_ valid IAP. ModifyL is called through a 
       
  1367  * field container.
       
  1368  */
       
  1369 	{
       
  1370     SetTestStepResult(EFail);
       
  1371     CreateSessionsL();
       
  1372     
       
  1373     CMDBField<TInt>* defaultIAP = new(ELeave)CMDBField<TInt>(KCDTIdIAPLink);
       
  1374     CleanupStack::PushL(defaultIAP);
       
  1375     
       
  1376     defaultIAP->SetRecordId(1);    
       
  1377     *defaultIAP = 30;
       
  1378     
       
  1379     TRAPD(err, defaultIAP->ModifyL(*iCDSession_v11));
       
  1380     
       
  1381     if (KErrNotFound == err)
       
  1382     	{
       
  1383     	SetTestStepResult(EPass);
       
  1384     	}
       
  1385     
       
  1386     CleanupStack::PopAndDestroy(defaultIAP);
       
  1387     
       
  1388     return TestStepResult();
       
  1389 	}
       
  1390 
       
  1391 //----------------------------------------------------------------------------------------------------------------
       
  1392 CCommsdat342Step::CCommsdat342Step()/**
       
  1393  * Constructor
       
  1394  */
       
  1395 	{
       
  1396 	SetTestStepName(KCommsdat342Step);
       
  1397 	}
       
  1398 
       
  1399 CCommsdat342Step::~CCommsdat342Step()
       
  1400 /**
       
  1401  * Destructor
       
  1402  */
       
  1403 	{
       
  1404 	delete iCDSession_v11;
       
  1405 	delete iCDSession_vLatest;
       
  1406 	}
       
  1407 
       
  1408 TVerdict CCommsdat342Step::doTestStepPreambleL()
       
  1409 	{
       
  1410 	SetTestStepResult(EPass);
       
  1411 	return TestStepResult();
       
  1412 	}
       
  1413 
       
  1414 TVerdict CCommsdat342Step::doTestStepPostambleL()
       
  1415 	{
       
  1416 	return TestStepResult();
       
  1417 	}
       
  1418 
       
  1419 void CCommsdat342Step::CreateSessionsL()
       
  1420 	{
       
  1421     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  1422 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  1423     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  1424 #else
       
  1425     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  1426 #endif
       
  1427 	}
       
  1428 
       
  1429 
       
  1430 TVerdict CCommsdat342Step::doTestStepL()
       
  1431 /**
       
  1432  * @return - TVerdict code
       
  1433  * Storing a new connpref record with rank2 and delete the connpref record with rank1. 
       
  1434  * 
       
  1435  * Consecvencies:
       
  1436  * 1. There will be a default AP generated because the rank1 record is deleted.
       
  1437  *    (customselpol record will be CCDAccessPointRecord::KNoPolicy of it)
       
  1438  * 2. This record will be linked form the APPrioritySelPol record (from the AP1 field)
       
  1439  * 3. Because the rank2 connpref record is a prompting record the generated IPProto AP
       
  1440  *    will be a prompting AP too. Meaning that the full TMDBElementId of the connpref
       
  1441  *    record (record2) will be stored in the CprConfig field of the generated IPProto AP.
       
  1442  * 
       
  1443  * Delete is called on a record container 
       
  1444  */
       
  1445 	{
       
  1446     SetTestStepResult(EFail);
       
  1447     CreateSessionsL();
       
  1448     
       
  1449 	CCDConnectionPrefsRecord *cpRecord = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord);
       
  1450 	CleanupStack::PushL(cpRecord);
       
  1451 	
       
  1452 	CCDIAPRecord* iapRec = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  1453 	CleanupStack::PushL(iapRec);
       
  1454 	
       
  1455 	iapRec->SetRecordId(10);
       
  1456 	iapRec->LoadL(*iCDSession_v11);
       
  1457 	
       
  1458 	cpRecord->SetRecordId(2);
       
  1459 	cpRecord->iDefaultIAP = iapRec->RecordId();
       
  1460 	cpRecord->iRanking = 2;
       
  1461 	cpRecord->iDirection = ECommDbConnectionDirectionOutgoing;
       
  1462 	cpRecord->iBearerSet = KCommDbBearerCSD;
       
  1463 	cpRecord->iDialogPref = ECommDbDialogPrefPrompt;
       
  1464 	
       
  1465 	cpRecord->StoreL(*iCDSession_v11);
       
  1466 	
       
  1467 	CleanupStack::PopAndDestroy(iapRec);
       
  1468 	CleanupStack::PopAndDestroy(cpRecord);
       
  1469 	
       
  1470 	//and now delete the 1st connpref record causing a hole in the mapped
       
  1471 	//APPrioritySelPol record (AP1 link will be 0 but the APCount field of the rec
       
  1472 	//should be still 2)
       
  1473 	
       
  1474 	CCDConnectionPrefsRecord *cpRec = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord);
       
  1475 	CleanupStack::PushL(cpRec);
       
  1476 	
       
  1477 	cpRec->SetRecordId(1);
       
  1478 	cpRec->DeleteL(*iCDSession_v11);
       
  1479 	
       
  1480 	CleanupStack::PopAndDestroy(cpRec);
       
  1481 	
       
  1482 	
       
  1483 	CCDConnectionPrefsRecord *cpRecord1 = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord);
       
  1484 	CleanupStack::PushL(cpRecord1);
       
  1485 	
       
  1486 	cpRecord1->SetRecordId(1);
       
  1487 	TRAPD(err, cpRecord1->LoadL(*iCDSession_v11));
       
  1488 	
       
  1489 	if (KErrNotFound == err)
       
  1490 		{
       
  1491 		//ok, the connPref record is deleted
       
  1492 		CCDAPPrioritySelectionPolicyRecord* apPrioritySelPolRec = static_cast<CCDAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord));
       
  1493 		CleanupStack::PushL(apPrioritySelPolRec);
       
  1494 		//The last record is used for this mapping
       
  1495 		apPrioritySelPolRec->SetRecordId(254);
       
  1496 		
       
  1497 		apPrioritySelPolRec->LoadL(*iCDSession_vLatest);
       
  1498 		
       
  1499 		if ( NULL != apPrioritySelPolRec->iAp1 &&
       
  1500 			 2 == apPrioritySelPolRec->iApCount )
       
  1501 			{
       
  1502 			//1st ipprotoAP should contain CCDAccessPointRecord::KNoPolicy in its' customSelPol field
       
  1503 			//2nd ipprotoAP should contain the full TMDBElementID of the 2nd connpref record
       
  1504 			CCDAccessPointRecord* apRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord));
       
  1505 			CleanupStack::PushL(apRec);
       
  1506 			
       
  1507 			apRec->SetElementId(apPrioritySelPolRec->iAp1);
       
  1508 			apRec->LoadL(*iCDSession_vLatest);
       
  1509 			
       
  1510 			TPtrC recName(apRec->iRecordName);
       
  1511 			_LIT(KDefIPProtoRecName, "IPProtoDefault");
       
  1512 			
       
  1513 			if (CCDAccessPointRecord::KNoPolicy == apRec->iCustomSelectionPolicy &&
       
  1514 				0 == recName.Compare(KDefIPProtoRecName))
       
  1515 				{
       
  1516 				//ok, the 1st ipproto AP is fine
       
  1517 				apRec->SetElementId(apPrioritySelPolRec->iAp2);
       
  1518 				apRec->LoadL(*iCDSession_vLatest);
       
  1519 				
       
  1520 				CCDConnectionPrefsRecord *cpRecord2 = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord);
       
  1521 				CleanupStack::PushL(cpRecord2);
       
  1522 				
       
  1523 				cpRecord2->SetRecordId(2);
       
  1524 				cpRecord2->LoadL(*iCDSession_v11);
       
  1525 				
       
  1526 				if (apRec->iCprConfig == cpRecord2->ElementId())
       
  1527 					{
       
  1528 					SetTestStepResult(EPass);
       
  1529 					}
       
  1530 				
       
  1531 				CleanupStack::PopAndDestroy(cpRecord2);
       
  1532 				}
       
  1533 			
       
  1534 			CleanupStack::PopAndDestroy(apRec);
       
  1535 			}
       
  1536 		
       
  1537 		CleanupStack::PopAndDestroy(apPrioritySelPolRec);
       
  1538 		}
       
  1539 
       
  1540 	CleanupStack::PopAndDestroy(cpRecord1);
       
  1541 	
       
  1542     return TestStepResult();
       
  1543 	}
       
  1544 
       
  1545 //----------------------------------------------------------------------------------------------------------------
       
  1546 CCommsdat343Step::CCommsdat343Step()/**
       
  1547  * Constructor
       
  1548  */
       
  1549 	{
       
  1550 	SetTestStepName(KCommsdat343Step);
       
  1551 	}
       
  1552 
       
  1553 CCommsdat343Step::~CCommsdat343Step()
       
  1554 /**
       
  1555  * Destructor
       
  1556  */
       
  1557 	{
       
  1558 	delete iCDSession_v11;
       
  1559 	delete iCDSession_vLatest;
       
  1560 	}
       
  1561 
       
  1562 TVerdict CCommsdat343Step::doTestStepPreambleL()
       
  1563 	{
       
  1564 	SetTestStepResult(EPass);
       
  1565 	return TestStepResult();
       
  1566 	}
       
  1567 
       
  1568 TVerdict CCommsdat343Step::doTestStepPostambleL()
       
  1569 	{
       
  1570 	return TestStepResult();
       
  1571 	}
       
  1572 
       
  1573 void CCommsdat343Step::CreateSessionsL()
       
  1574 	{
       
  1575     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  1576 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  1577     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  1578 #else
       
  1579     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  1580 #endif
       
  1581 	}
       
  1582 
       
  1583 
       
  1584 TVerdict CCommsdat343Step::doTestStepL()
       
  1585 /**
       
  1586  * @return - TVerdict code
       
  1587  * Storing a new connpref record with rank1 and delete the connpref record with rank2. Delete 
       
  1588  * is called on a record container 
       
  1589  * This test step is dependent on CCommsdat342Step
       
  1590  */
       
  1591 	{
       
  1592     SetTestStepResult(EFail);
       
  1593     CreateSessionsL();
       
  1594     
       
  1595 	CCDConnectionPrefsRecord *cpRecord = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord);
       
  1596 	CleanupStack::PushL(cpRecord);
       
  1597 	
       
  1598 	CCDIAPRecord* iapRec = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  1599 	CleanupStack::PushL(iapRec);
       
  1600 	
       
  1601 	iapRec->SetRecordId(3);
       
  1602 	iapRec->LoadL(*iCDSession_v11);
       
  1603 	
       
  1604 	cpRecord->SetRecordId(1);
       
  1605 	cpRecord->iDefaultIAP = iapRec->RecordId();
       
  1606 	cpRecord->iRanking = 1;
       
  1607 	cpRecord->iDirection = ECommDbConnectionDirectionOutgoing;
       
  1608 	cpRecord->iBearerSet = KCommDbBearerCSD;
       
  1609 	cpRecord->iDialogPref = ECommDbDialogPrefPrompt;
       
  1610 	
       
  1611 	cpRecord->StoreL(*iCDSession_v11);
       
  1612 	
       
  1613 	CleanupStack::PopAndDestroy(iapRec);
       
  1614 	CleanupStack::PopAndDestroy(cpRecord);
       
  1615 	
       
  1616 	//and now delete the 2nd connpref record
       
  1617 	
       
  1618 	CCDConnectionPrefsRecord *cpRec = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord);
       
  1619 	CleanupStack::PushL(cpRec);
       
  1620 	
       
  1621 	cpRec->SetRecordId(2);
       
  1622 	cpRec->DeleteL(*iCDSession_v11);
       
  1623 	
       
  1624 	CleanupStack::PopAndDestroy(cpRec);
       
  1625 	
       
  1626 	CCDConnectionPrefsRecord *cpRecord1 = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord);
       
  1627 	CleanupStack::PushL(cpRecord1);
       
  1628 	
       
  1629 	cpRecord1->SetRecordId(2);
       
  1630 	TRAPD(err, cpRecord1->LoadL(*iCDSession_v11));
       
  1631 	
       
  1632 	if (KErrNotFound == err)
       
  1633 		{
       
  1634 		//ok, the connPref record is deleted
       
  1635 		CCDAPPrioritySelectionPolicyRecord* apPrioritySelPolRec = static_cast<CCDAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord));
       
  1636 		CleanupStack::PushL(apPrioritySelPolRec);
       
  1637 		//The last record is used for this mapping
       
  1638 		apPrioritySelPolRec->SetRecordId(254);
       
  1639 		
       
  1640 		apPrioritySelPolRec->LoadL(*iCDSession_vLatest);
       
  1641 		
       
  1642 		if ( NULL == apPrioritySelPolRec->iAp2 &&
       
  1643 			 1 == apPrioritySelPolRec->iApCount )
       
  1644 			{
       
  1645 			//ok, we have only 1 valid link in the mapped APPrioritySelPol record (the 1st one)
       
  1646 			CCDTierRecord* tierRec = static_cast<CCDTierRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdTierRecord));
       
  1647 			CleanupStack::PushL(tierRec);
       
  1648 			
       
  1649 			//we just know that the IPProto tier record is the 2nd
       
  1650 			tierRec->SetRecordId(2);
       
  1651 			tierRec->LoadL(*iCDSession_vLatest);
       
  1652 			
       
  1653 			CMDBRecordLink<CCDAccessPointRecord>* apPriorityVal = &(apPrioritySelPolRec->iAp1);
       
  1654 			
       
  1655 			TInt apPriority = apPrioritySelPolRec->iAp1;
       
  1656 			TInt tierDefAP = tierRec->iDefaultAccessPoint;
       
  1657 			
       
  1658 			if (apPriority == tierDefAP)
       
  1659 				{
       
  1660 				//ok, the 2 links are the same
       
  1661 				CCDAccessPointRecord* ipProtoAPRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord));
       
  1662 				CleanupStack::PushL(ipProtoAPRec);
       
  1663 				
       
  1664 				ipProtoAPRec->SetElementId(*apPriorityVal);
       
  1665 				ipProtoAPRec->LoadL(*iCDSession_vLatest);
       
  1666 				
       
  1667 				if (3 == ipProtoAPRec->iCustomSelectionPolicy)
       
  1668 					{
       
  1669 					//remember, when we created the the connpref rec with rank1 the IAP which is
       
  1670 					//linked was the 3rd
       
  1671 					SetTestStepResult(EPass);
       
  1672 					}
       
  1673 				
       
  1674 				CleanupStack::PopAndDestroy(ipProtoAPRec);
       
  1675 				}
       
  1676 			CleanupStack::PopAndDestroy(tierRec);
       
  1677 			}
       
  1678 		
       
  1679 		CleanupStack::PopAndDestroy(apPrioritySelPolRec);
       
  1680 		}
       
  1681 
       
  1682 	CleanupStack::PopAndDestroy(cpRecord1);
       
  1683 	
       
  1684     return TestStepResult();
       
  1685 	}
       
  1686 
       
  1687 //----------------------------------------------------------------------------------------------------------------
       
  1688 CCommsdat344Step::CCommsdat344Step()/**
       
  1689  * Constructor
       
  1690  */
       
  1691 	{
       
  1692 	SetTestStepName(KCommsdat344Step);
       
  1693 	}
       
  1694 
       
  1695 CCommsdat344Step::~CCommsdat344Step()
       
  1696 /**
       
  1697  * Destructor
       
  1698  */
       
  1699 	{
       
  1700 	delete iCDSession_v11;
       
  1701 	delete iCDSession_vLatest;
       
  1702 	}
       
  1703 
       
  1704 TVerdict CCommsdat344Step::doTestStepPreambleL()
       
  1705 	{
       
  1706 	SetTestStepResult(EPass);
       
  1707 	return TestStepResult();
       
  1708 	}
       
  1709 
       
  1710 TVerdict CCommsdat344Step::doTestStepPostambleL()
       
  1711 	{
       
  1712 	return TestStepResult();
       
  1713 	}
       
  1714 
       
  1715 void CCommsdat344Step::CreateSessionsL()
       
  1716 	{
       
  1717     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  1718 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  1719     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  1720 #else
       
  1721     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  1722 #endif
       
  1723 	}
       
  1724 
       
  1725 
       
  1726 TVerdict CCommsdat344Step::doTestStepL()
       
  1727 /**
       
  1728  * @return - TVerdict code
       
  1729  * deleting the defaultIAP field from the connpref record with rank1
       
  1730  * Delete is called through a field container
       
  1731  */
       
  1732 	{
       
  1733     SetTestStepResult(EFail);
       
  1734     CreateSessionsL();
       
  1735     
       
  1736 	CCDConnectionPrefsRecord *cpRecord = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord);
       
  1737 	CleanupStack::PushL(cpRecord);
       
  1738     
       
  1739 	cpRecord->iRanking = 1;
       
  1740 	cpRecord->FindL(*iCDSession_v11);
       
  1741     
       
  1742     CMDBField<TInt>* connPrefDefIAPField = new(ELeave)CMDBField<TInt>(KCDTIdIAPLink);
       
  1743     CleanupStack::PushL(connPrefDefIAPField);
       
  1744     
       
  1745     connPrefDefIAPField->SetRecordId(cpRecord->RecordId());
       
  1746     connPrefDefIAPField->DeleteL(*iCDSession_v11);
       
  1747     
       
  1748     CleanupStack::PopAndDestroy(connPrefDefIAPField);
       
  1749     CleanupStack::PopAndDestroy(cpRecord);
       
  1750     
       
  1751     
       
  1752 	CCDConnectionPrefsRecord *cpRecord1 = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord);
       
  1753 	CleanupStack::PushL(cpRecord1);
       
  1754 	
       
  1755 	cpRecord1->SetRecordId(1);
       
  1756 	cpRecord1->LoadL(*iCDSession_v11);
       
  1757 	
       
  1758 	if (NULL == cpRecord1->iDefaultIAP)
       
  1759 		{
       
  1760 		//ok, the defaultIAP link is 0
       
  1761 		CCDAPPrioritySelectionPolicyRecord* apPrioritySelPolRec = static_cast<CCDAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord));
       
  1762 		CleanupStack::PushL(apPrioritySelPolRec);
       
  1763 		//The last record is used for this mapping
       
  1764 		apPrioritySelPolRec->SetRecordId(254);
       
  1765 		
       
  1766 		apPrioritySelPolRec->LoadL(*iCDSession_vLatest);
       
  1767 		
       
  1768 		if ( NULL != apPrioritySelPolRec->iAp1 &&
       
  1769 			 1 == apPrioritySelPolRec->iApCount )
       
  1770 			{
       
  1771 			//1st ipprotoAP should contain CCDAccessPointRecord::KNoPolicy in its' customSelPol field
       
  1772 			CCDAccessPointRecord* apRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord));
       
  1773 			CleanupStack::PushL(apRec);
       
  1774 			
       
  1775 			apRec->SetElementId(apPrioritySelPolRec->iAp1);
       
  1776 			apRec->LoadL(*iCDSession_vLatest);
       
  1777 			
       
  1778 			TPtrC recName(apRec->iRecordName);
       
  1779 			_LIT(KDefIPProtoRecName, "IPProtoDefault");
       
  1780 			
       
  1781 			if (CCDAccessPointRecord::KNoPolicy == apRec->iCustomSelectionPolicy &&
       
  1782 				0 == recName.Compare(KDefIPProtoRecName) &&
       
  1783 				0 == apRec->iCprConfig)
       
  1784 				{
       
  1785 				CCDTierRecord* tierRec = static_cast<CCDTierRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdTierRecord));
       
  1786 				CleanupStack::PushL(tierRec);
       
  1787 				
       
  1788 				//we just know that the IPProto tier record is the 2nd
       
  1789 				tierRec->SetRecordId(2);
       
  1790 				tierRec->LoadL(*iCDSession_vLatest);
       
  1791 				
       
  1792 				TInt tierLink = tierRec->iDefaultAccessPoint;
       
  1793 				TInt apPrioritySelPolLink = apPrioritySelPolRec->iAp1;
       
  1794 				
       
  1795 				if ( tierRec->iDefaultAccessPoint == (apRec->ElementId() & ~KCDMaskShowFieldType) &&
       
  1796 					 tierLink == apPrioritySelPolLink )
       
  1797 					{
       
  1798 					SetTestStepResult(EPass);
       
  1799 					}
       
  1800 				
       
  1801 				CleanupStack::PopAndDestroy(tierRec);
       
  1802 				}
       
  1803 			
       
  1804 			CleanupStack::PopAndDestroy(apRec);
       
  1805 			}
       
  1806 		
       
  1807 		CleanupStack::PopAndDestroy(apPrioritySelPolRec);
       
  1808 		}
       
  1809 	
       
  1810 	CleanupStack::PopAndDestroy(cpRecord1);
       
  1811 	
       
  1812     return TestStepResult();
       
  1813 	}
       
  1814 
       
  1815 //----------------------------------------------------------------------------------------------------------------
       
  1816 CCommsdat345Step::CCommsdat345Step()/**
       
  1817  * Constructor
       
  1818  */
       
  1819 	{
       
  1820 	SetTestStepName(KCommsdat345Step);
       
  1821 	}
       
  1822 
       
  1823 CCommsdat345Step::~CCommsdat345Step()
       
  1824 /**
       
  1825  * Destructor
       
  1826  */
       
  1827 	{
       
  1828 	delete iCDSession_v11;
       
  1829 	delete iCDSession_vLatest;
       
  1830 	}
       
  1831 
       
  1832 TVerdict CCommsdat345Step::doTestStepPreambleL()
       
  1833 	{
       
  1834 	SetTestStepResult(EPass);
       
  1835 	return TestStepResult();
       
  1836 	}
       
  1837 
       
  1838 TVerdict CCommsdat345Step::doTestStepPostambleL()
       
  1839 	{
       
  1840 	return TestStepResult();
       
  1841 	}
       
  1842 
       
  1843 void CCommsdat345Step::CreateSessionsL()
       
  1844 	{
       
  1845     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  1846 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  1847     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  1848 #else
       
  1849     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  1850 #endif
       
  1851 	}
       
  1852 
       
  1853 
       
  1854 TVerdict CCommsdat345Step::doTestStepL()
       
  1855 /**
       
  1856  * @return - TVerdict code
       
  1857  * deleting the defaultIAP field from the connpref record with rank2
       
  1858  * Delete is called through a field container
       
  1859  */
       
  1860 	{
       
  1861     SetTestStepResult(EFail);
       
  1862     CreateSessionsL();
       
  1863     
       
  1864 	CCDConnectionPrefsRecord *cpRec = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord);
       
  1865 	CleanupStack::PushL(cpRec);
       
  1866 	
       
  1867 	CCDIAPRecord* iapRec = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  1868 	CleanupStack::PushL(iapRec);
       
  1869 	
       
  1870 	iapRec->SetRecordId(3);
       
  1871 	iapRec->LoadL(*iCDSession_v11);
       
  1872 	
       
  1873 	//1st inserting a new connpref record with rank2
       
  1874 	cpRec->SetRecordId(2);
       
  1875 	cpRec->iDefaultIAP = iapRec->RecordId();
       
  1876 	cpRec->iRanking = 2;
       
  1877 	cpRec->iDirection = ECommDbConnectionDirectionOutgoing;
       
  1878 	cpRec->iBearerSet = KCommDbBearerCSD;
       
  1879 	cpRec->iDialogPref = ECommDbDialogPrefPrompt;
       
  1880 	
       
  1881 	cpRec->StoreL(*iCDSession_v11);
       
  1882 	
       
  1883 	CleanupStack::PopAndDestroy(iapRec);
       
  1884 	CleanupStack::PopAndDestroy(cpRec);
       
  1885     
       
  1886 	//delete the linked IAP record from the DB
       
  1887 	CCDIAPRecord* iapRecToDelete = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  1888 	CleanupStack::PushL(iapRecToDelete);
       
  1889 	
       
  1890 	iapRecToDelete->SetRecordId(3);
       
  1891 	iapRecToDelete->DeleteL(*iCDSession_vLatest);
       
  1892 	CleanupStack::PopAndDestroy(iapRecToDelete);
       
  1893 	
       
  1894 	
       
  1895 	CCDConnectionPrefsRecord *cpRecord = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord);
       
  1896 	CleanupStack::PushL(cpRecord);
       
  1897     
       
  1898 	cpRecord->iRanking = 2;
       
  1899 	cpRecord->FindL(*iCDSession_v11);
       
  1900     
       
  1901     CMDBField<TInt>* connPrefDefIAPField = new(ELeave)CMDBField<TInt>(KCDTIdIAPLink);
       
  1902     CleanupStack::PushL(connPrefDefIAPField);
       
  1903     
       
  1904     connPrefDefIAPField->SetRecordId(cpRecord->RecordId());
       
  1905     connPrefDefIAPField->DeleteL(*iCDSession_v11);
       
  1906     
       
  1907     CleanupStack::PopAndDestroy(connPrefDefIAPField);
       
  1908     CleanupStack::PopAndDestroy(cpRecord);
       
  1909     
       
  1910     
       
  1911 	CCDConnectionPrefsRecord *cpRecord1 = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord);
       
  1912 	CleanupStack::PushL(cpRecord1);
       
  1913 	
       
  1914 	cpRecord1->SetRecordId(2);
       
  1915 	cpRecord1->LoadL(*iCDSession_v11);
       
  1916 	
       
  1917 	if (NULL == cpRecord1->iDefaultIAP)
       
  1918 		{
       
  1919 		//ok, the defaultIAP link is 0
       
  1920 		CCDAPPrioritySelectionPolicyRecord* apPrioritySelPolRec = static_cast<CCDAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord));
       
  1921 		CleanupStack::PushL(apPrioritySelPolRec);
       
  1922 		//The last record is used for this mapping
       
  1923 		apPrioritySelPolRec->SetRecordId(254);
       
  1924 		
       
  1925 		apPrioritySelPolRec->LoadL(*iCDSession_vLatest);
       
  1926 		
       
  1927 		if ( NULL == apPrioritySelPolRec->iAp2 &&
       
  1928 			 1 == apPrioritySelPolRec->iApCount )
       
  1929 			{
       
  1930 			//ok, we have only 1 valid link in the mapped APPrioritySelPol record (the 1st one)
       
  1931 			CCDTierRecord* tierRec = static_cast<CCDTierRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdTierRecord));
       
  1932 			CleanupStack::PushL(tierRec);
       
  1933 			
       
  1934 			//we just know that the IPProto tier record is the 2nd
       
  1935 			tierRec->SetRecordId(2);
       
  1936 			tierRec->LoadL(*iCDSession_vLatest);
       
  1937 			
       
  1938 			TInt apPriority = apPrioritySelPolRec->iAp1;
       
  1939 			TInt tierDefAP = tierRec->iDefaultAccessPoint;
       
  1940 			
       
  1941 			if (apPriority == tierDefAP)
       
  1942 				{
       
  1943 				SetTestStepResult(EPass);
       
  1944 				}
       
  1945 			CleanupStack::PopAndDestroy(tierRec);
       
  1946 			}
       
  1947 		
       
  1948 		CleanupStack::PopAndDestroy(apPrioritySelPolRec);
       
  1949 		}
       
  1950 	
       
  1951 	CleanupStack::PopAndDestroy(cpRecord1);
       
  1952 	
       
  1953     return TestStepResult();
       
  1954 	}
       
  1955 
       
  1956 //----------------------------------------------------------------------------------------------------------------
       
  1957 CCommsdat346Step::CCommsdat346Step()/**
       
  1958  * Constructor
       
  1959  */
       
  1960 	{
       
  1961 	SetTestStepName(KCommsdat346Step);
       
  1962 	}
       
  1963 
       
  1964 CCommsdat346Step::~CCommsdat346Step()
       
  1965 /**
       
  1966  * Destructor
       
  1967  */
       
  1968 	{
       
  1969 	delete iCDSession_v11;
       
  1970 	delete iCDSession_vLatest;
       
  1971 	}
       
  1972 
       
  1973 TVerdict CCommsdat346Step::doTestStepPreambleL()
       
  1974 	{
       
  1975 	SetTestStepResult(EPass);
       
  1976 	return TestStepResult();
       
  1977 	}
       
  1978 
       
  1979 TVerdict CCommsdat346Step::doTestStepPostambleL()
       
  1980 	{
       
  1981 	return TestStepResult();
       
  1982 	}
       
  1983 
       
  1984 void CCommsdat346Step::CreateSessionsL()
       
  1985 	{
       
  1986     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  1987 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  1988     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  1989 #else
       
  1990     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  1991 #endif
       
  1992 	}
       
  1993 
       
  1994 
       
  1995 TVerdict CCommsdat346Step::doTestStepL()
       
  1996 /**
       
  1997  * @return - TVerdict code
       
  1998  * storing an IAP record and setting the defaultIAP link in the connpref record with ranking1
       
  1999  * The config file used for this test step doesn't contain any IAP records and the defaultIAP
       
  2000  * link in the connpref record is 0. In this case CommsDat doesn't generate any 399 path.
       
  2001  * The modify is called through a record container
       
  2002  */
       
  2003 	{
       
  2004     SetTestStepResult(EFail);
       
  2005     CreateSessionsL();
       
  2006     
       
  2007     //insert a new IAP record
       
  2008 	CCDIAPRecord *iapRecord = (CCDIAPRecord*)CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord);
       
  2009 	CleanupStack::PushL(iapRecord); 
       
  2010 	
       
  2011 	//Insert an IAP record; which will be referred by conn pref records
       
  2012 	iapRecord->SetRecordId(KCDNewRecordRequest); 
       
  2013 	iapRecord->iServiceType.SetMaxLengthL(KMaxTextLength);
       
  2014 	iapRecord->iServiceType= TPtrC(DIAL_OUT_ISP);
       
  2015 	iapRecord->iService=2;
       
  2016 	iapRecord->iBearerType.SetMaxLengthL(KMaxTextLength);
       
  2017 	iapRecord->iBearerType=TPtrC(MODEM_BEARER);
       
  2018 	iapRecord->iBearer=3;
       
  2019     
       
  2020 	iapRecord->StoreL(*iCDSession_v11);
       
  2021 	
       
  2022 	CCDConnectionPrefsRecord* connPrefRec = static_cast<CCDConnectionPrefsRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord));
       
  2023 	CleanupStack::PushL(connPrefRec);
       
  2024 	
       
  2025 	connPrefRec->SetRecordId(1);
       
  2026 	connPrefRec->LoadL(*iCDSession_v11);
       
  2027 	
       
  2028 	connPrefRec->iDefaultIAP = iapRecord->RecordId();
       
  2029 	
       
  2030 	connPrefRec->ModifyL(*iCDSession_v11);
       
  2031 	
       
  2032 	CleanupStack::PopAndDestroy(connPrefRec);
       
  2033 	
       
  2034 	CCDConnectionPrefsRecord* connPrefRec1 = static_cast<CCDConnectionPrefsRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord));
       
  2035 	CleanupStack::PushL(connPrefRec1);
       
  2036 	
       
  2037 	connPrefRec1->SetRecordId(1);
       
  2038 	connPrefRec1->LoadL(*iCDSession_v11);
       
  2039 	
       
  2040 	if (iapRecord->RecordId() == connPrefRec1->iDefaultIAP)
       
  2041 		{
       
  2042 		CCDAPPrioritySelectionPolicyRecord* apPrioritySelPolRec = static_cast<CCDAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord));
       
  2043 		CleanupStack::PushL(apPrioritySelPolRec);
       
  2044 		//The last record is used for this mapping
       
  2045 		apPrioritySelPolRec->SetRecordId(254);
       
  2046 		
       
  2047 		apPrioritySelPolRec->LoadL(*iCDSession_vLatest);
       
  2048 		
       
  2049 		if ( NULL != apPrioritySelPolRec->iAp1 &&
       
  2050 			 1 == apPrioritySelPolRec->iApCount )
       
  2051 			{
       
  2052 			//ok, we have only 1 valid link in the mapped APPrioritySelPol record (the 1st one)
       
  2053 			CCDTierRecord* tierRec = static_cast<CCDTierRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdTierRecord));
       
  2054 			CleanupStack::PushL(tierRec);
       
  2055 			
       
  2056 			//we just know that the IPProto tier record is the 2nd
       
  2057 			tierRec->SetRecordId(2);
       
  2058 			tierRec->LoadL(*iCDSession_vLatest);
       
  2059 			
       
  2060 			TInt apPriority = apPrioritySelPolRec->iAp1;
       
  2061 			TInt tierDefAP = tierRec->iDefaultAccessPoint;
       
  2062 			
       
  2063 			if (apPriority == tierDefAP)
       
  2064 				{
       
  2065 				SetTestStepResult(EPass);
       
  2066 				}
       
  2067 			CleanupStack::PopAndDestroy(tierRec);
       
  2068 			}
       
  2069 		
       
  2070 		CleanupStack::PopAndDestroy(apPrioritySelPolRec);
       
  2071 		}
       
  2072 	
       
  2073 	CleanupStack::PopAndDestroy(connPrefRec1);
       
  2074 	CleanupStack::PopAndDestroy(iapRecord);
       
  2075 	
       
  2076     return TestStepResult();
       
  2077 	}
       
  2078 
       
  2079 //----------------------------------------------------------------------------------------------------------------
       
  2080 CCommsdat347Step::CCommsdat347Step()/**
       
  2081  * Constructor
       
  2082  */
       
  2083 	{
       
  2084 	SetTestStepName(KCommsdat347Step);
       
  2085 	}
       
  2086 
       
  2087 CCommsdat347Step::~CCommsdat347Step()
       
  2088 /**
       
  2089  * Destructor
       
  2090  */
       
  2091 	{
       
  2092 	delete iCDSession_v11;
       
  2093 	delete iCDSession_vLatest;
       
  2094 	}
       
  2095 
       
  2096 TVerdict CCommsdat347Step::doTestStepPreambleL()
       
  2097 	{
       
  2098 	SetTestStepResult(EPass);
       
  2099 	return TestStepResult();
       
  2100 	}
       
  2101 
       
  2102 TVerdict CCommsdat347Step::doTestStepPostambleL()
       
  2103 	{
       
  2104 	return TestStepResult();
       
  2105 	}
       
  2106 
       
  2107 void CCommsdat347Step::CreateSessionsL()
       
  2108 	{
       
  2109     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  2110 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  2111     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  2112 #else
       
  2113     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  2114 #endif
       
  2115 	}
       
  2116 
       
  2117 
       
  2118 TVerdict CCommsdat347Step::doTestStepL()
       
  2119 /**
       
  2120  * @return - TVerdict code
       
  2121  * modify the defaultIAP field in the connpref rec with rank1 to 0. In this case
       
  2122  * although it's a modification commsdat has to delete the 399 path...
       
  2123  * The modify is called through a record container
       
  2124  * The expected behaviour in this case is that commsDat sets the 0 for the defaultIAP link
       
  2125  * but leaves the already constructed default path as it is. So nothing is deleted...
       
  2126  */
       
  2127 	{
       
  2128     SetTestStepResult(EFail);
       
  2129     CreateSessionsL();
       
  2130 	
       
  2131 	CCDConnectionPrefsRecord* connPrefRec = static_cast<CCDConnectionPrefsRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord));
       
  2132 	CleanupStack::PushL(connPrefRec);
       
  2133 	
       
  2134 	connPrefRec->SetRecordId(1);
       
  2135 	
       
  2136 	connPrefRec->LoadL(*iCDSession_v11);
       
  2137 	
       
  2138 	connPrefRec->iDefaultIAP = 0;
       
  2139 	connPrefRec->ModifyL(*iCDSession_v11);
       
  2140 	
       
  2141 	CleanupStack::PopAndDestroy(connPrefRec);
       
  2142 	
       
  2143 	
       
  2144 	CCDConnectionPrefsRecord *cpRecord1 = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord);
       
  2145 	CleanupStack::PushL(cpRecord1);
       
  2146 	
       
  2147 	cpRecord1->SetRecordId(1);
       
  2148 	cpRecord1->LoadL(*iCDSession_v11);
       
  2149 	
       
  2150 	if (NULL == cpRecord1->iDefaultIAP)
       
  2151 		{
       
  2152 		//ok, the defaultIAP link is 0
       
  2153 		CCDAPPrioritySelectionPolicyRecord* apPrioritySelPolRec = static_cast<CCDAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord));
       
  2154 		CleanupStack::PushL(apPrioritySelPolRec);
       
  2155 		//The last record is used for this mapping
       
  2156 		apPrioritySelPolRec->SetRecordId(254);
       
  2157 		
       
  2158 		apPrioritySelPolRec->LoadL(*iCDSession_vLatest);
       
  2159 		
       
  2160 		if ( NULL != apPrioritySelPolRec->iAp1 &&
       
  2161 			 1 == apPrioritySelPolRec->iApCount )
       
  2162 			{
       
  2163 			//ok, we have only 1 valid link in the mapped APPrioritySelPol record (the 1st one)
       
  2164 			CCDTierRecord* tierRec = static_cast<CCDTierRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdTierRecord));
       
  2165 			CleanupStack::PushL(tierRec);
       
  2166 			
       
  2167 			//we just know that the IPProto tier record is the 2nd
       
  2168 			tierRec->SetRecordId(2);
       
  2169 			tierRec->LoadL(*iCDSession_vLatest);
       
  2170 			
       
  2171 			TInt apPriority = apPrioritySelPolRec->iAp1;
       
  2172 			TInt tierDefAP = tierRec->iDefaultAccessPoint;
       
  2173 			
       
  2174 			if (apPriority == tierDefAP)
       
  2175 				{
       
  2176 				SetTestStepResult(EPass);
       
  2177 				}
       
  2178 			CleanupStack::PopAndDestroy(tierRec);
       
  2179 			}
       
  2180 		
       
  2181 		CleanupStack::PopAndDestroy(apPrioritySelPolRec);
       
  2182 		}
       
  2183 	
       
  2184 	CleanupStack::PopAndDestroy(cpRecord1);
       
  2185 	
       
  2186     return TestStepResult();
       
  2187 	}
       
  2188 
       
  2189 //----------------------------------------------------------------------------------------------------------------
       
  2190 CCommsdat348Step::CCommsdat348Step()/**
       
  2191  * Constructor
       
  2192  */
       
  2193 	{
       
  2194 	SetTestStepName(KCommsdat348Step);
       
  2195 	}
       
  2196 
       
  2197 CCommsdat348Step::~CCommsdat348Step()
       
  2198 /**
       
  2199  * Destructor
       
  2200  */
       
  2201 	{
       
  2202 	delete iCDSession_v11;
       
  2203 	delete iCDSession_vLatest;
       
  2204 	}
       
  2205 
       
  2206 TVerdict CCommsdat348Step::doTestStepPreambleL()
       
  2207 	{
       
  2208 	SetTestStepResult(EPass);
       
  2209 	return TestStepResult();
       
  2210 	}
       
  2211 
       
  2212 TVerdict CCommsdat348Step::doTestStepPostambleL()
       
  2213 	{
       
  2214 	return TestStepResult();
       
  2215 	}
       
  2216 
       
  2217 void CCommsdat348Step::CreateSessionsL()
       
  2218 	{
       
  2219     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  2220 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  2221     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  2222 #else
       
  2223     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  2224 #endif
       
  2225 	}
       
  2226 
       
  2227 
       
  2228 TVerdict CCommsdat348Step::doTestStepL()
       
  2229 /**
       
  2230  * @return - TVerdict code
       
  2231  * Deleting an IAP record -> the 'mapped' AP record should be deleted too
       
  2232  */
       
  2233 	{
       
  2234     SetTestStepResult(EFail);
       
  2235     CreateSessionsL();
       
  2236 	
       
  2237     CMDBField<TInt>* mappedLinkLevelAPTagId = new(ELeave)CMDBField<TInt>(KCDTIdAccessPointRecord | KCDTIdRecordTag);
       
  2238     CleanupStack::PushL(mappedLinkLevelAPTagId);
       
  2239     
       
  2240     *mappedLinkLevelAPTagId = 3;
       
  2241     
       
  2242     if (mappedLinkLevelAPTagId->FindL(*iCDSession_vLatest))
       
  2243     	{
       
  2244     	//ok, at this point we have the 'mapped' link level AP
       
  2245 	    CCDIAPRecord* iapRec = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  2246 	    CleanupStack::PushL(iapRec);
       
  2247 	    
       
  2248 	    iapRec->SetRecordId(3);
       
  2249 	    iapRec->DeleteL(*iCDSession_v11);
       
  2250 	    
       
  2251 	    CleanupStack::PopAndDestroy(iapRec);
       
  2252 	    
       
  2253 	    if (! (mappedLinkLevelAPTagId->FindL(*iCDSession_vLatest)) )
       
  2254 	    	{
       
  2255 	    	//this time the mapped link level AP shouldn't be in the db anymore
       
  2256 	    	SetTestStepResult(EPass);
       
  2257 	    	}
       
  2258     	}
       
  2259     
       
  2260     CleanupStack::PopAndDestroy(mappedLinkLevelAPTagId);
       
  2261     
       
  2262     return TestStepResult();
       
  2263 	}
       
  2264 
       
  2265 //----------------------------------------------------------------------------------------------------------------
       
  2266 CCommsdat349Step::CCommsdat349Step()/**
       
  2267  * Constructor
       
  2268  */
       
  2269 	{
       
  2270 	SetTestStepName(KCommsdat349Step);
       
  2271 	}
       
  2272 
       
  2273 CCommsdat349Step::~CCommsdat349Step()
       
  2274 /**
       
  2275  * Destructor
       
  2276  */
       
  2277 	{
       
  2278 	delete iCDSession_v11;
       
  2279 	delete iCDSession_vLatest;
       
  2280 	}
       
  2281 
       
  2282 TVerdict CCommsdat349Step::doTestStepPreambleL()
       
  2283 	{
       
  2284 	SetTestStepResult(EPass);
       
  2285 	return TestStepResult();
       
  2286 	}
       
  2287 
       
  2288 TVerdict CCommsdat349Step::doTestStepPostambleL()
       
  2289 	{
       
  2290 	return TestStepResult();
       
  2291 	}
       
  2292 
       
  2293 void CCommsdat349Step::CreateSessionsL()
       
  2294 	{
       
  2295     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  2296     iCDSession_vLatest = NULL;
       
  2297 	}
       
  2298 
       
  2299 
       
  2300 TVerdict CCommsdat349Step::doTestStepL()
       
  2301 /**
       
  2302  * @return - TVerdict code
       
  2303  * Try to load an IAP record with recordId 255, and 256. (this was a Nokia defect in 9.4)
       
  2304  */
       
  2305 	{
       
  2306     SetTestStepResult(EFail);
       
  2307     CreateSessionsL();
       
  2308 	
       
  2309     CCDIAPRecord* iapRec = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  2310     CleanupStack::PushL(iapRec);
       
  2311     iapRec->SetRecordId(256);
       
  2312     
       
  2313     TRAPD(err, iapRec->LoadL(*iCDSession_v11))
       
  2314     if (KErrNotFound == err)
       
  2315     	{
       
  2316         SetTestStepResult(EPass);
       
  2317     	}
       
  2318     
       
  2319     CleanupStack::PopAndDestroy(iapRec);
       
  2320     
       
  2321     return TestStepResult();
       
  2322 	}
       
  2323 
       
  2324 //----------------------------------------------------------------------------------------------------------------
       
  2325 CCommsdat350Step::CCommsdat350Step()/**
       
  2326  * Constructor
       
  2327  */
       
  2328 	{
       
  2329 	SetTestStepName(KCommsdat350Step);
       
  2330 	}
       
  2331 
       
  2332 CCommsdat350Step::~CCommsdat350Step()
       
  2333 /**
       
  2334  * Destructor
       
  2335  */
       
  2336 	{
       
  2337 	delete iCDSession_v11;
       
  2338 	delete iCDSession_vLatest;
       
  2339 	}
       
  2340 
       
  2341 TVerdict CCommsdat350Step::doTestStepPreambleL()
       
  2342 	{
       
  2343 	SetTestStepResult(EPass);
       
  2344 	return TestStepResult();
       
  2345 	}
       
  2346 
       
  2347 TVerdict CCommsdat350Step::doTestStepPostambleL()
       
  2348 	{
       
  2349 	return TestStepResult();
       
  2350 	}
       
  2351 
       
  2352 void CCommsdat350Step::CreateSessionsL()
       
  2353 	{
       
  2354     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  2355 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  2356     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  2357 #else
       
  2358     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  2359 #endif
       
  2360 	}
       
  2361 
       
  2362 
       
  2363 TVerdict CCommsdat350Step::doTestStepL()
       
  2364 /**
       
  2365  * @return - TVerdict code
       
  2366  * change the bearertype and bearer from modmbearer to lanbearer.
       
  2367  * Modify is called on a record container
       
  2368  */
       
  2369 	{
       
  2370     SetTestStepResult(EFail);
       
  2371     CreateSessionsL();
       
  2372 	
       
  2373     CCDIAPRecord* iapRec = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  2374     CleanupStack::PushL(iapRec);
       
  2375     iapRec->SetRecordId(1);
       
  2376     
       
  2377     iapRec->LoadL(*iCDSession_v11);
       
  2378     iapRec->iBearerType.SetMaxLengthL(KMaxTextLength);
       
  2379 	iapRec->iBearerType=TPtrC(LAN_BEARER);
       
  2380 	iapRec->iBearer=1;
       
  2381     
       
  2382 	iapRec->ModifyL(*iCDSession_v11);
       
  2383 	
       
  2384     CleanupStack::PopAndDestroy(iapRec);
       
  2385     
       
  2386     CCDIAPRecord* iapRec1 = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  2387     CleanupStack::PushL(iapRec1);
       
  2388     
       
  2389     CCDAccessPointRecord* associatedLinkAP = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord));
       
  2390     CleanupStack::PushL(associatedLinkAP);
       
  2391     
       
  2392     iapRec1->SetRecordId(1);
       
  2393     associatedLinkAP->iRecordTag = 1;
       
  2394     
       
  2395     iapRec1->LoadL(*iCDSession_v11);
       
  2396     
       
  2397     if (associatedLinkAP->FindL(*iCDSession_vLatest))
       
  2398     	{
       
  2399     	TPtrC bearerType(iapRec1->iBearerType);
       
  2400     	TPtrC apRecName(associatedLinkAP->iRecordName);
       
  2401     	_LIT(KExpectedAPName, "ethintMappedFromIAP1");
       
  2402     	
       
  2403     	if ( 0 == bearerType.Compare(TPtrC(LAN_BEARER)) &&
       
  2404     		 1 == iapRec1->iBearer &&
       
  2405     		 0 == apRecName.Compare(KExpectedAPName) &&
       
  2406     		 0 == associatedLinkAP->iSelectionPolicy &&
       
  2407     		 0x11800300 == associatedLinkAP->iTier &&
       
  2408     		 0x12000400 == associatedLinkAP->iMCpr &&
       
  2409     		 0x12800300 == associatedLinkAP->iCpr &&
       
  2410     		 0x13000300 == associatedLinkAP->iSCpr &&
       
  2411     		 0x13800400 == associatedLinkAP->iProtocol &&
       
  2412     		 0 == associatedLinkAP->iCprConfig &&
       
  2413     		 0 == associatedLinkAP->iAppSID &&
       
  2414     		 0 == associatedLinkAP->iCustomSelectionPolicy )
       
  2415     		{
       
  2416     		SetTestStepResult(EPass);
       
  2417     		}
       
  2418     	}
       
  2419     
       
  2420     CleanupStack::PopAndDestroy(associatedLinkAP);
       
  2421     CleanupStack::PopAndDestroy(iapRec1);
       
  2422     
       
  2423     return TestStepResult();
       
  2424 	}
       
  2425 
       
  2426 //----------------------------------------------------------------------------------------------------------------
       
  2427 CCommsdat351Step::CCommsdat351Step()/**
       
  2428  * Constructor
       
  2429  */
       
  2430 	{
       
  2431 	SetTestStepName(KCommsdat351Step);
       
  2432 	}
       
  2433 
       
  2434 CCommsdat351Step::~CCommsdat351Step()
       
  2435 /**
       
  2436  * Destructor
       
  2437  */
       
  2438 	{
       
  2439 	delete iCDSession_v11;
       
  2440 	delete iCDSession_vLatest;
       
  2441 	}
       
  2442 
       
  2443 TVerdict CCommsdat351Step::doTestStepPreambleL()
       
  2444 	{
       
  2445 	SetTestStepResult(EPass);
       
  2446 	return TestStepResult();
       
  2447 	}
       
  2448 
       
  2449 TVerdict CCommsdat351Step::doTestStepPostambleL()
       
  2450 	{
       
  2451 	return TestStepResult();
       
  2452 	}
       
  2453 
       
  2454 void CCommsdat351Step::CreateSessionsL()
       
  2455 	{
       
  2456     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  2457 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  2458     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  2459 #else
       
  2460     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  2461 #endif
       
  2462 	}
       
  2463 
       
  2464 
       
  2465 TVerdict CCommsdat351Step::doTestStepL()
       
  2466 /**
       
  2467  * @return - TVerdict code
       
  2468  * change the bearertype from lanbearer to modmbearer 
       
  2469  * Modify is called on a field container
       
  2470  */
       
  2471 	{
       
  2472     SetTestStepResult(EFail);
       
  2473     CreateSessionsL();
       
  2474 	
       
  2475     CMDBField<TDesC>* bearerType = new(ELeave)CMDBField<TDesC>(KCDTIdIAPBearerType);
       
  2476     CleanupStack::PushL(bearerType);
       
  2477     bearerType->SetRecordId(2);
       
  2478     
       
  2479     bearerType->SetMaxLengthL(KMaxTextLength);
       
  2480     bearerType->SetL(TPtrC(MODEM_BEARER));
       
  2481     
       
  2482     bearerType->ModifyL(*iCDSession_v11);
       
  2483 	
       
  2484     CleanupStack::PopAndDestroy(bearerType);
       
  2485     
       
  2486     CCDIAPRecord* iapRec1 = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  2487     CleanupStack::PushL(iapRec1);
       
  2488     
       
  2489     CCDAccessPointRecord* associatedLinkAP = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord));
       
  2490     CleanupStack::PushL(associatedLinkAP);
       
  2491     
       
  2492     iapRec1->SetRecordId(2);
       
  2493     associatedLinkAP->iRecordTag = 2;
       
  2494     
       
  2495     iapRec1->LoadL(*iCDSession_v11);
       
  2496     
       
  2497     if (associatedLinkAP->FindL(*iCDSession_vLatest))
       
  2498     	{
       
  2499     	TPtrC bearerTypeName(iapRec1->iBearerType);
       
  2500     	TPtrC apRecName(associatedLinkAP->iRecordName);
       
  2501     	_LIT(KExpectedAPName, "pppMappedFromIAP2");
       
  2502     	
       
  2503     	if ( 0 == bearerTypeName.Compare(TPtrC(MODEM_BEARER)) &&
       
  2504     		 2 == iapRec1->iBearer &&
       
  2505     		 0 == apRecName.Compare(KExpectedAPName) &&
       
  2506     		 0 == associatedLinkAP->iSelectionPolicy &&
       
  2507     		 0x11800300 == associatedLinkAP->iTier &&
       
  2508     		 0x12000300 == associatedLinkAP->iMCpr &&
       
  2509     		 0x12800300 == associatedLinkAP->iCpr &&
       
  2510     		 0x13000500 == associatedLinkAP->iSCpr &&
       
  2511     		 0x13800300 == associatedLinkAP->iProtocol &&
       
  2512     		 0 == associatedLinkAP->iCprConfig &&
       
  2513     		 0 == associatedLinkAP->iAppSID &&
       
  2514     		 0 == associatedLinkAP->iCustomSelectionPolicy )
       
  2515     		{
       
  2516     		SetTestStepResult(EPass);
       
  2517     		}
       
  2518     	}
       
  2519     
       
  2520     CleanupStack::PopAndDestroy(associatedLinkAP);
       
  2521     CleanupStack::PopAndDestroy(iapRec1);
       
  2522     
       
  2523     return TestStepResult();
       
  2524 	}
       
  2525 
       
  2526 //----------------------------------------------------------------------------------------------------------------
       
  2527 CCommsdat352Step::CCommsdat352Step()/**
       
  2528  * Constructor
       
  2529  */
       
  2530 	{
       
  2531 	SetTestStepName(KCommsdat352Step);
       
  2532 	}
       
  2533 
       
  2534 CCommsdat352Step::~CCommsdat352Step()
       
  2535 /**
       
  2536  * Destructor
       
  2537  */
       
  2538 	{
       
  2539 	delete iCDSession_v11;
       
  2540 	delete iCDSession_vLatest;
       
  2541 	}
       
  2542 
       
  2543 TVerdict CCommsdat352Step::doTestStepPreambleL()
       
  2544 	{
       
  2545 	SetTestStepResult(EPass);
       
  2546 	return TestStepResult();
       
  2547 	}
       
  2548 
       
  2549 TVerdict CCommsdat352Step::doTestStepPostambleL()
       
  2550 	{
       
  2551 	return TestStepResult();
       
  2552 	}
       
  2553 
       
  2554 void CCommsdat352Step::CreateSessionsL()
       
  2555 	{
       
  2556     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  2557 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  2558     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  2559 #else
       
  2560     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  2561 #endif
       
  2562 	}
       
  2563 
       
  2564 
       
  2565 TVerdict CCommsdat352Step::doTestStepL()
       
  2566 /**
       
  2567  * @return - TVerdict code
       
  2568  * change the bearer from 3 to 2 
       
  2569  * Modify is called on a field container
       
  2570  */
       
  2571 	{
       
  2572     SetTestStepResult(EFail);
       
  2573     CreateSessionsL();
       
  2574 	
       
  2575     CMDBField<TInt>* bearer = new(ELeave)CMDBField<TInt>(KCDTIdIAPBearer);
       
  2576     CleanupStack::PushL(bearer);
       
  2577     bearer->SetRecordId(3);
       
  2578     
       
  2579     *bearer = 2;
       
  2580     
       
  2581     bearer->ModifyL(*iCDSession_v11);
       
  2582 	
       
  2583     CleanupStack::PopAndDestroy(bearer);
       
  2584     
       
  2585     CCDIAPRecord* iapRec1 = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  2586     CleanupStack::PushL(iapRec1);
       
  2587     
       
  2588     CCDAccessPointRecord* associatedLinkAP = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord));
       
  2589     CleanupStack::PushL(associatedLinkAP);
       
  2590     
       
  2591     iapRec1->SetRecordId(3);
       
  2592     associatedLinkAP->iRecordTag = 3;
       
  2593     
       
  2594     iapRec1->LoadL(*iCDSession_v11);
       
  2595     
       
  2596     if (associatedLinkAP->FindL(*iCDSession_vLatest))
       
  2597     	{
       
  2598     	TPtrC bearerTypeName(iapRec1->iBearerType);
       
  2599     	TPtrC apRecName(associatedLinkAP->iRecordName);
       
  2600     	_LIT(KExpectedAPName, "pppMappedFromIAP3");
       
  2601     	
       
  2602     	if ( 0 == bearerTypeName.Compare(TPtrC(MODEM_BEARER)) &&
       
  2603     		 2 == iapRec1->iBearer &&
       
  2604     		 0 == apRecName.Compare(KExpectedAPName) &&
       
  2605     		 0 == associatedLinkAP->iSelectionPolicy &&
       
  2606     		 0x11800300 == associatedLinkAP->iTier &&
       
  2607     		 0x12000300 == associatedLinkAP->iMCpr &&
       
  2608     		 0x12800300 == associatedLinkAP->iCpr &&
       
  2609     		 0x13000500 == associatedLinkAP->iSCpr &&
       
  2610     		 0x13800300 == associatedLinkAP->iProtocol &&
       
  2611     		 0 == associatedLinkAP->iCprConfig &&
       
  2612     		 0 == associatedLinkAP->iAppSID &&
       
  2613     		 0 == associatedLinkAP->iCustomSelectionPolicy )
       
  2614     		{
       
  2615     		SetTestStepResult(EPass);
       
  2616     		}
       
  2617     	}
       
  2618     
       
  2619     CleanupStack::PopAndDestroy(associatedLinkAP);
       
  2620     CleanupStack::PopAndDestroy(iapRec1);
       
  2621     
       
  2622     return TestStepResult();
       
  2623 	}
       
  2624 
       
  2625 //----------------------------------------------------------------------------------------------------------------
       
  2626 CCommsdat353Step::CCommsdat353Step()/**
       
  2627  * Constructor
       
  2628  */
       
  2629 	{
       
  2630 	SetTestStepName(KCommsdat353Step);
       
  2631 	}
       
  2632 
       
  2633 CCommsdat353Step::~CCommsdat353Step()
       
  2634 /**
       
  2635  * Destructor
       
  2636  */
       
  2637 	{
       
  2638 	delete iCDSession_v11;
       
  2639 	delete iCDSession_vLatest;
       
  2640 	}
       
  2641 
       
  2642 TVerdict CCommsdat353Step::doTestStepPreambleL()
       
  2643 	{
       
  2644 	SetTestStepResult(EPass);
       
  2645 	return TestStepResult();
       
  2646 	}
       
  2647 
       
  2648 TVerdict CCommsdat353Step::doTestStepPostambleL()
       
  2649 	{
       
  2650 	return TestStepResult();
       
  2651 	}
       
  2652 
       
  2653 void CCommsdat353Step::CreateSessionsL()
       
  2654 	{
       
  2655     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  2656 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  2657     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  2658 #else
       
  2659     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  2660 #endif
       
  2661 	}
       
  2662 
       
  2663 
       
  2664 TVerdict CCommsdat353Step::doTestStepL()
       
  2665 /**
       
  2666  * @return - TVerdict code
       
  2667  * change the servicetype from dialout to lanservice and the service from 3 to 2
       
  2668  * Modify is called on a record container
       
  2669  */
       
  2670 	{
       
  2671     SetTestStepResult(EFail);
       
  2672     CreateSessionsL();
       
  2673 	
       
  2674     CCDIAPRecord* iapRec = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  2675     CleanupStack::PushL(iapRec);
       
  2676     iapRec->SetRecordId(4);
       
  2677     
       
  2678     iapRec->LoadL(*iCDSession_v11);
       
  2679     iapRec->iServiceType.SetMaxLengthL(KMaxTextLength);
       
  2680 	iapRec->iServiceType=TPtrC(LAN_SERVICE);
       
  2681 	iapRec->iService=2;
       
  2682     
       
  2683 	iapRec->ModifyL(*iCDSession_v11);
       
  2684 	
       
  2685     CleanupStack::PopAndDestroy(iapRec);
       
  2686     
       
  2687     CCDIAPRecord* iapRec1 = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  2688     CleanupStack::PushL(iapRec1);
       
  2689     
       
  2690     CCDAccessPointRecord* associatedLinkAP = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord));
       
  2691     CleanupStack::PushL(associatedLinkAP);
       
  2692     
       
  2693     iapRec1->SetRecordId(4);
       
  2694     associatedLinkAP->iRecordTag = 4;
       
  2695     
       
  2696     iapRec1->LoadL(*iCDSession_v11);
       
  2697     
       
  2698     if (associatedLinkAP->FindL(*iCDSession_vLatest))
       
  2699     	{
       
  2700     	TPtrC serviceTypeName(iapRec1->iServiceType);
       
  2701     	TPtrC apRecName(associatedLinkAP->iRecordName);
       
  2702     	_LIT(KExpectedAPName, "pppMappedFromIAP4");
       
  2703     	
       
  2704     	if ( 0 == serviceTypeName.Compare(TPtrC(LAN_SERVICE)) &&
       
  2705     		 2 == iapRec1->iService &&
       
  2706     		 0 == apRecName.Compare(KExpectedAPName) &&
       
  2707     		 0 == associatedLinkAP->iSelectionPolicy &&
       
  2708     		 0x11800300 == associatedLinkAP->iTier &&
       
  2709     		 0x12000300 == associatedLinkAP->iMCpr &&
       
  2710     		 0x12800300 == associatedLinkAP->iCpr &&
       
  2711     		 0x13000500 == associatedLinkAP->iSCpr &&
       
  2712     		 0x13800300 == associatedLinkAP->iProtocol &&
       
  2713     		 0 == associatedLinkAP->iCprConfig &&
       
  2714     		 0 == associatedLinkAP->iAppSID &&
       
  2715     		 0 == associatedLinkAP->iCustomSelectionPolicy )
       
  2716     		{
       
  2717     		SetTestStepResult(EPass);
       
  2718     		}
       
  2719     	}
       
  2720     
       
  2721     CleanupStack::PopAndDestroy(associatedLinkAP);
       
  2722     CleanupStack::PopAndDestroy(iapRec1);
       
  2723     
       
  2724     return TestStepResult();
       
  2725 	}
       
  2726 
       
  2727 //----------------------------------------------------------------------------------------------------------------
       
  2728 CCommsdat354Step::CCommsdat354Step()/**
       
  2729  * Constructor
       
  2730  */
       
  2731 	{
       
  2732 	SetTestStepName(KCommsdat354Step);
       
  2733 	}
       
  2734 
       
  2735 CCommsdat354Step::~CCommsdat354Step()
       
  2736 /**
       
  2737  * Destructor
       
  2738  */
       
  2739 	{
       
  2740 	delete iCDSession_v11;
       
  2741 	delete iCDSession_vLatest;
       
  2742 	}
       
  2743 
       
  2744 TVerdict CCommsdat354Step::doTestStepPreambleL()
       
  2745 	{
       
  2746 	SetTestStepResult(EPass);
       
  2747 	return TestStepResult();
       
  2748 	}
       
  2749 
       
  2750 TVerdict CCommsdat354Step::doTestStepPostambleL()
       
  2751 	{
       
  2752 	return TestStepResult();
       
  2753 	}
       
  2754 
       
  2755 void CCommsdat354Step::CreateSessionsL()
       
  2756 	{
       
  2757     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  2758 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  2759     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  2760 #else
       
  2761     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  2762 #endif
       
  2763 	}
       
  2764 
       
  2765 
       
  2766 TVerdict CCommsdat354Step::doTestStepL()
       
  2767 /**
       
  2768  * @return - TVerdict code
       
  2769  * change the name of the iap record
       
  2770  * Modify is called on a record container
       
  2771  */
       
  2772 	{
       
  2773     SetTestStepResult(EFail);
       
  2774     CreateSessionsL();
       
  2775 	
       
  2776     CCDIAPRecord* iapRec = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  2777     CleanupStack::PushL(iapRec);
       
  2778     iapRec->SetRecordId(5);
       
  2779     
       
  2780     _LIT(KNewIAPName, "New IAP record name");
       
  2781     
       
  2782     iapRec->LoadL(*iCDSession_v11);
       
  2783     iapRec->iRecordName.SetMaxLengthL(KNewIAPName().Length());
       
  2784 	iapRec->iRecordName.SetL(KNewIAPName);
       
  2785     
       
  2786 	iapRec->ModifyL(*iCDSession_v11);
       
  2787 	
       
  2788     CleanupStack::PopAndDestroy(iapRec);
       
  2789     
       
  2790     CCDIAPRecord* iapRec1 = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  2791     CleanupStack::PushL(iapRec1);
       
  2792     
       
  2793     CCDAccessPointRecord* associatedLinkAP = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord));
       
  2794     CleanupStack::PushL(associatedLinkAP);
       
  2795     
       
  2796     iapRec1->SetRecordId(5);
       
  2797     associatedLinkAP->iRecordTag = 5;
       
  2798     
       
  2799     iapRec1->LoadL(*iCDSession_v11);
       
  2800     
       
  2801     if (associatedLinkAP->FindL(*iCDSession_vLatest))
       
  2802     	{
       
  2803     	TPtrC serviceTypeName(iapRec1->iServiceType);
       
  2804     	TPtrC apRecName(associatedLinkAP->iRecordName);
       
  2805     	TPtrC iapRecName(iapRec1->iRecordName);
       
  2806     	
       
  2807     	_LIT(KExpectedAPName, "pppMappedFromIAP5");
       
  2808     	
       
  2809     	if ( 0 == serviceTypeName.Compare(TPtrC(DIAL_OUT_ISP)) &&
       
  2810     		 4 == iapRec1->iService &&
       
  2811     		 0 == iapRecName.Compare(KNewIAPName) &&
       
  2812     		 0 == apRecName.Compare(KExpectedAPName) &&
       
  2813     		 0 == associatedLinkAP->iSelectionPolicy &&
       
  2814     		 0x11800300 == associatedLinkAP->iTier &&
       
  2815     		 0x12000300 == associatedLinkAP->iMCpr &&
       
  2816     		 0x12800300 == associatedLinkAP->iCpr &&
       
  2817     		 0x13000500 == associatedLinkAP->iSCpr &&
       
  2818     		 0x13800300 == associatedLinkAP->iProtocol &&
       
  2819     		 0 == associatedLinkAP->iCprConfig &&
       
  2820     		 0 == associatedLinkAP->iAppSID &&
       
  2821     		 0 == associatedLinkAP->iCustomSelectionPolicy )
       
  2822     		{
       
  2823     		SetTestStepResult(EPass);
       
  2824     		}
       
  2825     	}
       
  2826     
       
  2827     CleanupStack::PopAndDestroy(associatedLinkAP);
       
  2828     CleanupStack::PopAndDestroy(iapRec1);
       
  2829     
       
  2830     return TestStepResult();
       
  2831 	}
       
  2832 
       
  2833 //----------------------------------------------------------------------------------------------------------------
       
  2834 CCommsdat355Step::CCommsdat355Step()/**
       
  2835  * Constructor
       
  2836  */
       
  2837 	{
       
  2838 	SetTestStepName(KCommsdat355Step);
       
  2839 	}
       
  2840 
       
  2841 CCommsdat355Step::~CCommsdat355Step()
       
  2842 /**
       
  2843  * Destructor
       
  2844  */
       
  2845 	{
       
  2846 	delete iCDSession_v11;
       
  2847 	delete iCDSession_vLatest;
       
  2848 	}
       
  2849 
       
  2850 TVerdict CCommsdat355Step::doTestStepPreambleL()
       
  2851 	{
       
  2852 	SetTestStepResult(EPass);
       
  2853 	return TestStepResult();
       
  2854 	}
       
  2855 
       
  2856 TVerdict CCommsdat355Step::doTestStepPostambleL()
       
  2857 	{
       
  2858 	return TestStepResult();
       
  2859 	}
       
  2860 
       
  2861 void CCommsdat355Step::CreateSessionsL()
       
  2862 	{
       
  2863     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  2864 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  2865     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  2866 #else
       
  2867     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  2868 #endif
       
  2869 	}
       
  2870 
       
  2871 
       
  2872 TVerdict CCommsdat355Step::doTestStepL()
       
  2873 /**
       
  2874  * @return - TVerdict code
       
  2875  * change the name of the iap record
       
  2876  * Modify is called on a field container
       
  2877  */
       
  2878 	{
       
  2879     SetTestStepResult(EFail);
       
  2880     CreateSessionsL();
       
  2881 	
       
  2882     CMDBField<TDesC>* iapNameField = new(ELeave)CMDBField<TDesC>(KCDTIdIAPRecord | KCDTIdRecordName);
       
  2883     CleanupStack::PushL(iapNameField);
       
  2884     iapNameField->SetRecordId(6);
       
  2885     
       
  2886     _LIT(KNewIAPName, "New IAP record name 02");
       
  2887     
       
  2888     iapNameField->SetMaxLengthL(KNewIAPName().Length());
       
  2889     iapNameField->SetL(KNewIAPName);
       
  2890     
       
  2891     iapNameField->ModifyL(*iCDSession_v11);
       
  2892 	
       
  2893     CleanupStack::PopAndDestroy(iapNameField);
       
  2894     
       
  2895     CCDIAPRecord* iapRec1 = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  2896     CleanupStack::PushL(iapRec1);
       
  2897     
       
  2898     CCDAccessPointRecord* associatedLinkAP = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord));
       
  2899     CleanupStack::PushL(associatedLinkAP);
       
  2900     
       
  2901     iapRec1->SetRecordId(6);
       
  2902     associatedLinkAP->iRecordTag = 6;
       
  2903     
       
  2904     iapRec1->LoadL(*iCDSession_v11);
       
  2905     
       
  2906     if (associatedLinkAP->FindL(*iCDSession_vLatest))
       
  2907     	{
       
  2908     	TPtrC serviceTypeName(iapRec1->iServiceType);
       
  2909     	TPtrC apRecName(associatedLinkAP->iRecordName);
       
  2910     	TPtrC iapRecName(iapRec1->iRecordName);
       
  2911     	
       
  2912     	_LIT(KExpectedAPName, "pppMappedFromIAP6");
       
  2913     	
       
  2914     	if ( 0 == serviceTypeName.Compare(TPtrC(DIAL_OUT_ISP)) &&
       
  2915     		 2 == iapRec1->iService &&
       
  2916     		 0 == iapRecName.Compare(KNewIAPName) &&
       
  2917     		 0 == apRecName.Compare(KExpectedAPName) &&
       
  2918     		 0 == associatedLinkAP->iSelectionPolicy &&
       
  2919     		 0x11800300 == associatedLinkAP->iTier &&
       
  2920     		 0x12000300 == associatedLinkAP->iMCpr &&
       
  2921     		 0x12800300 == associatedLinkAP->iCpr &&
       
  2922     		 0x13000500 == associatedLinkAP->iSCpr &&
       
  2923     		 0x13800300 == associatedLinkAP->iProtocol &&
       
  2924     		 0 == associatedLinkAP->iCprConfig &&
       
  2925     		 0 == associatedLinkAP->iAppSID &&
       
  2926     		 0 == associatedLinkAP->iCustomSelectionPolicy )
       
  2927     		{
       
  2928     		SetTestStepResult(EPass);
       
  2929     		}
       
  2930     	}
       
  2931     
       
  2932     CleanupStack::PopAndDestroy(associatedLinkAP);
       
  2933     CleanupStack::PopAndDestroy(iapRec1);
       
  2934     
       
  2935     return TestStepResult();
       
  2936 	}
       
  2937 
       
  2938 //----------------------------------------------------------------------------------------------------------------
       
  2939 CCommsdat356Step::CCommsdat356Step()/**
       
  2940  * Constructor
       
  2941  */
       
  2942 	{
       
  2943 	SetTestStepName(KCommsdat356Step);
       
  2944 	}
       
  2945 
       
  2946 CCommsdat356Step::~CCommsdat356Step()
       
  2947 /**
       
  2948  * Destructor
       
  2949  */
       
  2950 	{
       
  2951 	delete iCDSession_v11;
       
  2952 	delete iCDSession_vLatest;
       
  2953 	}
       
  2954 
       
  2955 TVerdict CCommsdat356Step::doTestStepPreambleL()
       
  2956 	{
       
  2957 	SetTestStepResult(EPass);
       
  2958 	return TestStepResult();
       
  2959 	}
       
  2960 
       
  2961 TVerdict CCommsdat356Step::doTestStepPostambleL()
       
  2962 	{
       
  2963 	return TestStepResult();
       
  2964 	}
       
  2965 
       
  2966 void CCommsdat356Step::CreateSessionsL()
       
  2967 	{
       
  2968     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  2969 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  2970     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  2971 #else
       
  2972     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  2973 #endif
       
  2974 	}
       
  2975 
       
  2976 
       
  2977 TVerdict CCommsdat356Step::doTestStepL()
       
  2978 /**
       
  2979  * @return - TVerdict code
       
  2980  * change the network weighting field of the iap record
       
  2981  * Modify is called on a record container
       
  2982  */
       
  2983 	{
       
  2984     SetTestStepResult(EFail);
       
  2985     CreateSessionsL();
       
  2986 	
       
  2987     CCDIAPRecord* iapRec = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  2988     CleanupStack::PushL(iapRec);
       
  2989     iapRec->SetRecordId(7);
       
  2990     
       
  2991     iapRec->LoadL(*iCDSession_v11);
       
  2992     iapRec->iNetworkWeighting = 4;
       
  2993     
       
  2994 	iapRec->ModifyL(*iCDSession_v11);
       
  2995 	
       
  2996     CleanupStack::PopAndDestroy(iapRec);
       
  2997     
       
  2998     CCDIAPRecord* iapRec1 = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  2999     CleanupStack::PushL(iapRec1);
       
  3000     
       
  3001     CCDAccessPointRecord* associatedLinkAP = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord));
       
  3002     CleanupStack::PushL(associatedLinkAP);
       
  3003     
       
  3004     iapRec1->SetRecordId(7);
       
  3005     associatedLinkAP->iRecordTag = 7;
       
  3006     
       
  3007     iapRec1->LoadL(*iCDSession_v11);
       
  3008     
       
  3009     if (associatedLinkAP->FindL(*iCDSession_vLatest))
       
  3010     	{
       
  3011     	TPtrC serviceTypeName(iapRec1->iServiceType);
       
  3012     	TPtrC apRecName(associatedLinkAP->iRecordName);
       
  3013     	
       
  3014     	_LIT(KExpectedAPName, "pppMappedFromIAP7");
       
  3015     	
       
  3016     	if ( 0 == serviceTypeName.Compare(TPtrC(DIAL_OUT_ISP)) &&
       
  3017     		 5 == iapRec1->iService &&
       
  3018     		 4 == iapRec1->iNetworkWeighting &&
       
  3019     		 0 == apRecName.Compare(KExpectedAPName) &&
       
  3020     		 0 == associatedLinkAP->iSelectionPolicy &&
       
  3021     		 0x11800300 == associatedLinkAP->iTier &&
       
  3022     		 0x12000300 == associatedLinkAP->iMCpr &&
       
  3023     		 0x12800300 == associatedLinkAP->iCpr &&
       
  3024     		 0x13000500 == associatedLinkAP->iSCpr &&
       
  3025     		 0x13800300 == associatedLinkAP->iProtocol &&
       
  3026     		 0 == associatedLinkAP->iCprConfig &&
       
  3027     		 0 == associatedLinkAP->iAppSID &&
       
  3028     		 0 == associatedLinkAP->iCustomSelectionPolicy )
       
  3029     		{
       
  3030     		SetTestStepResult(EPass);
       
  3031     		}
       
  3032     	}
       
  3033     
       
  3034     CleanupStack::PopAndDestroy(associatedLinkAP);
       
  3035     CleanupStack::PopAndDestroy(iapRec1);
       
  3036     
       
  3037     return TestStepResult();
       
  3038 	}
       
  3039 
       
  3040 //----------------------------------------------------------------------------------------------------------------
       
  3041 CCommsdat357Step::CCommsdat357Step()/**
       
  3042  * Constructor
       
  3043  */
       
  3044 	{
       
  3045 	SetTestStepName(KCommsdat357Step);
       
  3046 	}
       
  3047 
       
  3048 CCommsdat357Step::~CCommsdat357Step()
       
  3049 /**
       
  3050  * Destructor
       
  3051  */
       
  3052 	{
       
  3053 	delete iCDSession_v11;
       
  3054 	delete iCDSession_vLatest;
       
  3055 	}
       
  3056 
       
  3057 TVerdict CCommsdat357Step::doTestStepPreambleL()
       
  3058 	{
       
  3059 	SetTestStepResult(EPass);
       
  3060 	return TestStepResult();
       
  3061 	}
       
  3062 
       
  3063 TVerdict CCommsdat357Step::doTestStepPostambleL()
       
  3064 	{
       
  3065 	return TestStepResult();
       
  3066 	}
       
  3067 
       
  3068 void CCommsdat357Step::CreateSessionsL()
       
  3069 	{
       
  3070     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  3071 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  3072     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  3073 #else
       
  3074     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  3075 #endif
       
  3076 	}
       
  3077 
       
  3078 
       
  3079 TVerdict CCommsdat357Step::doTestStepL()
       
  3080 /**
       
  3081  * @return - TVerdict code
       
  3082  * change the network weighting field of the iap record
       
  3083  * Modify is called on a field container
       
  3084  */
       
  3085 	{
       
  3086     SetTestStepResult(EFail);
       
  3087     CreateSessionsL();
       
  3088 	
       
  3089     CMDBField<TInt>* iapNetworkWeitghtingField = new(ELeave)CMDBField<TInt>(KCDTIdIAPNetworkWeighting);
       
  3090     CleanupStack::PushL(iapNetworkWeitghtingField);
       
  3091     iapNetworkWeitghtingField->SetRecordId(8);
       
  3092     
       
  3093     *iapNetworkWeitghtingField = 5;
       
  3094     
       
  3095     iapNetworkWeitghtingField->ModifyL(*iCDSession_v11);
       
  3096 	
       
  3097     CleanupStack::PopAndDestroy(iapNetworkWeitghtingField);
       
  3098     
       
  3099     CCDIAPRecord* iapRec1 = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  3100     CleanupStack::PushL(iapRec1);
       
  3101     
       
  3102     CCDAccessPointRecord* associatedLinkAP = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord));
       
  3103     CleanupStack::PushL(associatedLinkAP);
       
  3104     
       
  3105     iapRec1->SetRecordId(8);
       
  3106     associatedLinkAP->iRecordTag = 8;
       
  3107     
       
  3108     iapRec1->LoadL(*iCDSession_v11);
       
  3109     
       
  3110     if (associatedLinkAP->FindL(*iCDSession_vLatest))
       
  3111     	{
       
  3112     	TPtrC serviceTypeName(iapRec1->iServiceType);
       
  3113     	TPtrC apRecName(associatedLinkAP->iRecordName);
       
  3114     	
       
  3115     	_LIT(KExpectedAPName, "pppMappedFromIAP8");
       
  3116     	
       
  3117     	if ( 0 == serviceTypeName.Compare(TPtrC(DIAL_OUT_ISP)) &&
       
  3118     		 3 == iapRec1->iService &&
       
  3119     		 5 == iapRec1->iNetworkWeighting &&
       
  3120     		 0 == apRecName.Compare(KExpectedAPName) &&
       
  3121     		 0 == associatedLinkAP->iSelectionPolicy &&
       
  3122     		 0x11800300 == associatedLinkAP->iTier &&
       
  3123     		 0x12000300 == associatedLinkAP->iMCpr &&
       
  3124     		 0x12800300 == associatedLinkAP->iCpr &&
       
  3125     		 0x13000500 == associatedLinkAP->iSCpr &&
       
  3126     		 0x13800300 == associatedLinkAP->iProtocol &&
       
  3127     		 0 == associatedLinkAP->iCprConfig &&
       
  3128     		 0 == associatedLinkAP->iAppSID &&
       
  3129     		 0 == associatedLinkAP->iCustomSelectionPolicy )
       
  3130     		{
       
  3131     		SetTestStepResult(EPass);
       
  3132     		}
       
  3133     	}
       
  3134     
       
  3135     CleanupStack::PopAndDestroy(associatedLinkAP);
       
  3136     CleanupStack::PopAndDestroy(iapRec1);
       
  3137     
       
  3138     return TestStepResult();
       
  3139 	}
       
  3140 
       
  3141 //----------------------------------------------------------------------------------------------------------------
       
  3142 CCommsdat358Step::CCommsdat358Step()/**
       
  3143  * Constructor
       
  3144  */
       
  3145 	{
       
  3146 	SetTestStepName(KCommsdat358Step);
       
  3147 	}
       
  3148 
       
  3149 CCommsdat358Step::~CCommsdat358Step()
       
  3150 /**
       
  3151  * Destructor
       
  3152  */
       
  3153 	{
       
  3154 	delete iCDSession_v11;
       
  3155 	delete iCDSession_vLatest;
       
  3156 	}
       
  3157 
       
  3158 TVerdict CCommsdat358Step::doTestStepPreambleL()
       
  3159 	{
       
  3160 	SetTestStepResult(EPass);
       
  3161 	return TestStepResult();
       
  3162 	}
       
  3163 
       
  3164 TVerdict CCommsdat358Step::doTestStepPostambleL()
       
  3165 	{
       
  3166 	return TestStepResult();
       
  3167 	}
       
  3168 
       
  3169 void CCommsdat358Step::CreateSessionsL()
       
  3170 	{
       
  3171     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  3172 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  3173     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  3174 #else
       
  3175     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  3176 #endif
       
  3177 	}
       
  3178 
       
  3179 
       
  3180 TVerdict CCommsdat358Step::doTestStepL()
       
  3181 /**
       
  3182  * @return - TVerdict code
       
  3183  * change the sid  field of the iap record
       
  3184  * Modify is called on a record container
       
  3185  */
       
  3186 	{
       
  3187     SetTestStepResult(EFail);
       
  3188     CreateSessionsL();
       
  3189 	
       
  3190     const TInt KDummySid = 0x4324567; 
       
  3191     
       
  3192     CCDIAPRecord* iapRec = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  3193     CleanupStack::PushL(iapRec);
       
  3194     iapRec->SetRecordId(9);
       
  3195     
       
  3196     iapRec->LoadL(*iCDSession_v11);
       
  3197     iapRec->iAppSid = KDummySid;
       
  3198     
       
  3199 	iapRec->ModifyL(*iCDSession_v11);
       
  3200 	
       
  3201     CleanupStack::PopAndDestroy(iapRec);
       
  3202     
       
  3203     CCDIAPRecord* iapRec1 = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  3204     CleanupStack::PushL(iapRec1);
       
  3205     
       
  3206     CCDAccessPointRecord* associatedLinkAP = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord));
       
  3207     CleanupStack::PushL(associatedLinkAP);
       
  3208     
       
  3209     iapRec1->SetRecordId(9);
       
  3210     associatedLinkAP->iRecordTag = 9;
       
  3211     
       
  3212     iapRec1->LoadL(*iCDSession_v11);
       
  3213     
       
  3214     if (associatedLinkAP->FindL(*iCDSession_vLatest))
       
  3215     	{
       
  3216     	TPtrC serviceTypeName(iapRec1->iServiceType);
       
  3217     	TPtrC apRecName(associatedLinkAP->iRecordName);
       
  3218     	
       
  3219     	_LIT(KExpectedAPName, "ethintMappedFromIAP9");
       
  3220     	
       
  3221     	if ( 0 == serviceTypeName.Compare(TPtrC(LAN_SERVICE)) &&
       
  3222     		 2 == iapRec1->iService &&
       
  3223     		 KDummySid == iapRec1->iAppSid &&
       
  3224     		 0 == apRecName.Compare(KExpectedAPName) &&
       
  3225     		 0 == associatedLinkAP->iSelectionPolicy &&
       
  3226     		 0x11800300 == associatedLinkAP->iTier &&
       
  3227     		 0x12000400 == associatedLinkAP->iMCpr &&
       
  3228     		 0x12800300 == associatedLinkAP->iCpr &&
       
  3229     		 0x13000300 == associatedLinkAP->iSCpr &&
       
  3230     		 0x13800400 == associatedLinkAP->iProtocol &&
       
  3231     		 0 == associatedLinkAP->iCprConfig &&
       
  3232     		 KDummySid == associatedLinkAP->iAppSID &&
       
  3233     		 0 == associatedLinkAP->iCustomSelectionPolicy )
       
  3234     		{
       
  3235     		SetTestStepResult(EPass);
       
  3236     		}
       
  3237     	}
       
  3238     
       
  3239     CleanupStack::PopAndDestroy(associatedLinkAP);
       
  3240     CleanupStack::PopAndDestroy(iapRec1);
       
  3241     
       
  3242     return TestStepResult();
       
  3243 	}
       
  3244 
       
  3245 //----------------------------------------------------------------------------------------------------------------
       
  3246 CCommsdat359Step::CCommsdat359Step()/**
       
  3247  * Constructor
       
  3248  */
       
  3249 	{
       
  3250 	SetTestStepName(KCommsdat359Step);
       
  3251 	}
       
  3252 
       
  3253 CCommsdat359Step::~CCommsdat359Step()
       
  3254 /**
       
  3255  * Destructor
       
  3256  */
       
  3257 	{
       
  3258 	delete iCDSession_v11;
       
  3259 	delete iCDSession_vLatest;
       
  3260 	}
       
  3261 
       
  3262 TVerdict CCommsdat359Step::doTestStepPreambleL()
       
  3263 	{
       
  3264 	SetTestStepResult(EPass);
       
  3265 	return TestStepResult();
       
  3266 	}
       
  3267 
       
  3268 TVerdict CCommsdat359Step::doTestStepPostambleL()
       
  3269 	{
       
  3270 	return TestStepResult();
       
  3271 	}
       
  3272 
       
  3273 void CCommsdat359Step::CreateSessionsL()
       
  3274 	{
       
  3275     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  3276 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  3277     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  3278 #else
       
  3279     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  3280 #endif
       
  3281 	}
       
  3282 
       
  3283 
       
  3284 TVerdict CCommsdat359Step::doTestStepL()
       
  3285 /**
       
  3286  * @return - TVerdict code
       
  3287  * change the sid  field of the iap record
       
  3288  * Modify is called on a field container
       
  3289  */
       
  3290 	{
       
  3291     SetTestStepResult(EFail);
       
  3292     CreateSessionsL();
       
  3293 	
       
  3294     const TInt KDummySid = 0x4324567; 
       
  3295     
       
  3296     CMDBField<TInt>* iapSidField = new(ELeave)CMDBField<TInt>(KCDTIdIAPAppSid);
       
  3297     CleanupStack::PushL(iapSidField);
       
  3298     iapSidField->SetRecordId(10);
       
  3299     
       
  3300     *iapSidField = KDummySid;
       
  3301     
       
  3302     iapSidField->ModifyL(*iCDSession_v11);
       
  3303 	
       
  3304     CleanupStack::PopAndDestroy(iapSidField);
       
  3305     
       
  3306     CCDIAPRecord* iapRec1 = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  3307     CleanupStack::PushL(iapRec1);
       
  3308     
       
  3309     CCDAccessPointRecord* associatedLinkAP = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord));
       
  3310     CleanupStack::PushL(associatedLinkAP);
       
  3311     
       
  3312     iapRec1->SetRecordId(10);
       
  3313     associatedLinkAP->iRecordTag = 10;
       
  3314     
       
  3315     iapRec1->LoadL(*iCDSession_v11);
       
  3316     
       
  3317     if (associatedLinkAP->FindL(*iCDSession_vLatest))
       
  3318     	{
       
  3319     	TPtrC serviceTypeName(iapRec1->iServiceType);
       
  3320     	TPtrC apRecName(associatedLinkAP->iRecordName);
       
  3321     	
       
  3322     	_LIT(KExpectedAPName, "pppMappedFromIAP10");
       
  3323     	
       
  3324     	if ( 0 == serviceTypeName.Compare(TPtrC(DIAL_OUT_ISP)) &&
       
  3325     		 6 == iapRec1->iService &&
       
  3326     		 KDummySid == iapRec1->iAppSid &&
       
  3327     		 0 == apRecName.Compare(KExpectedAPName) &&
       
  3328     		 0 == associatedLinkAP->iSelectionPolicy &&
       
  3329     		 0x11800300 == associatedLinkAP->iTier &&
       
  3330     		 0x12000300 == associatedLinkAP->iMCpr &&
       
  3331     		 0x12800300 == associatedLinkAP->iCpr &&
       
  3332     		 0x13000500 == associatedLinkAP->iSCpr &&
       
  3333     		 0x13800300 == associatedLinkAP->iProtocol &&
       
  3334     		 0 == associatedLinkAP->iCprConfig &&
       
  3335     		 KDummySid == associatedLinkAP->iAppSID &&
       
  3336     		 0 == associatedLinkAP->iCustomSelectionPolicy )
       
  3337     		{
       
  3338     		SetTestStepResult(EPass);
       
  3339     		}
       
  3340     	}
       
  3341     
       
  3342     CleanupStack::PopAndDestroy(associatedLinkAP);
       
  3343     CleanupStack::PopAndDestroy(iapRec1);
       
  3344     
       
  3345     return TestStepResult();
       
  3346 	}
       
  3347 
       
  3348 //----------------------------------------------------------------------------------------------------------------
       
  3349 CCommsdat360Step::CCommsdat360Step()/**
       
  3350  * Constructor
       
  3351  */
       
  3352 	{
       
  3353 	SetTestStepName(KCommsdat360Step);
       
  3354 	}
       
  3355 
       
  3356 CCommsdat360Step::~CCommsdat360Step()
       
  3357 /**
       
  3358  * Destructor
       
  3359  */
       
  3360 	{
       
  3361 	delete iCDSession_v11;
       
  3362 	delete iCDSession_vLatest;
       
  3363 	}
       
  3364 
       
  3365 TVerdict CCommsdat360Step::doTestStepPreambleL()
       
  3366 	{
       
  3367 	SetTestStepResult(EPass);
       
  3368 	return TestStepResult();
       
  3369 	}
       
  3370 
       
  3371 TVerdict CCommsdat360Step::doTestStepPostambleL()
       
  3372 	{
       
  3373 	return TestStepResult();
       
  3374 	}
       
  3375 
       
  3376 void CCommsdat360Step::CreateSessionsL()
       
  3377 	{
       
  3378     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  3379 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  3380     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  3381 #else
       
  3382     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  3383 #endif
       
  3384 	}
       
  3385 
       
  3386 
       
  3387 TVerdict CCommsdat360Step::doTestStepL()
       
  3388 /**
       
  3389  * @return - TVerdict code
       
  3390  * delete the sid  field of the iap record
       
  3391  * delete is called on a field container
       
  3392  * This test step is dependent on the CCommsdat359Step
       
  3393  */
       
  3394 	{
       
  3395     SetTestStepResult(EFail);
       
  3396     CreateSessionsL();
       
  3397     
       
  3398     CMDBField<TInt>* iapSidField = new(ELeave)CMDBField<TInt>(KCDTIdIAPAppSid);
       
  3399     CleanupStack::PushL(iapSidField);
       
  3400     iapSidField->SetRecordId(10);
       
  3401     
       
  3402     iapSidField->DeleteL(*iCDSession_v11);
       
  3403 	
       
  3404     CleanupStack::PopAndDestroy(iapSidField);
       
  3405     
       
  3406     CCDIAPRecord* iapRec1 = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  3407     CleanupStack::PushL(iapRec1);
       
  3408     
       
  3409     CCDAccessPointRecord* associatedLinkAP = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord));
       
  3410     CleanupStack::PushL(associatedLinkAP);
       
  3411     
       
  3412     iapRec1->SetRecordId(10);
       
  3413     associatedLinkAP->iRecordTag = 10;
       
  3414     
       
  3415     iapRec1->LoadL(*iCDSession_v11);
       
  3416     
       
  3417     if (associatedLinkAP->FindL(*iCDSession_vLatest))
       
  3418     	{
       
  3419     	TPtrC serviceTypeName(iapRec1->iServiceType);
       
  3420     	TPtrC apRecName(associatedLinkAP->iRecordName);
       
  3421     	
       
  3422     	_LIT(KExpectedAPName, "pppMappedFromIAP10");
       
  3423     	
       
  3424     	if ( 0 == serviceTypeName.Compare(TPtrC(DIAL_OUT_ISP)) &&
       
  3425     		 6 == iapRec1->iService &&
       
  3426     		 0 == iapRec1->iAppSid &&
       
  3427     		 0 == apRecName.Compare(KExpectedAPName) &&
       
  3428     		 0 == associatedLinkAP->iSelectionPolicy &&
       
  3429     		 0x11800300 == associatedLinkAP->iTier &&
       
  3430     		 0x12000300 == associatedLinkAP->iMCpr &&
       
  3431     		 0x12800300 == associatedLinkAP->iCpr &&
       
  3432     		 0x13000500 == associatedLinkAP->iSCpr &&
       
  3433     		 0x13800300 == associatedLinkAP->iProtocol &&
       
  3434     		 0 == associatedLinkAP->iCprConfig &&
       
  3435     		 0 == associatedLinkAP->iAppSID &&
       
  3436     		 0 == associatedLinkAP->iCustomSelectionPolicy )
       
  3437     		{
       
  3438     		SetTestStepResult(EPass);
       
  3439     		}
       
  3440     	}
       
  3441     
       
  3442     CleanupStack::PopAndDestroy(associatedLinkAP);
       
  3443     CleanupStack::PopAndDestroy(iapRec1);
       
  3444     
       
  3445     return TestStepResult();
       
  3446 	}
       
  3447 
       
  3448 //----------------------------------------------------------------------------------------------------------------
       
  3449 CCommsdat361Step::CCommsdat361Step()/**
       
  3450  * Constructor
       
  3451  */
       
  3452 	{
       
  3453 	SetTestStepName(KCommsdat361Step);
       
  3454 	}
       
  3455 
       
  3456 CCommsdat361Step::~CCommsdat361Step()
       
  3457 /**
       
  3458  * Destructor
       
  3459  */
       
  3460 	{
       
  3461 	delete iCDSession_v11;
       
  3462 	delete iCDSession_vLatest;
       
  3463 	}
       
  3464 
       
  3465 TVerdict CCommsdat361Step::doTestStepPreambleL()
       
  3466 	{
       
  3467 	SetTestStepResult(EPass);
       
  3468 	return TestStepResult();
       
  3469 	}
       
  3470 
       
  3471 TVerdict CCommsdat361Step::doTestStepPostambleL()
       
  3472 	{
       
  3473 	return TestStepResult();
       
  3474 	}
       
  3475 
       
  3476 void CCommsdat361Step::CreateSessionsL()
       
  3477 	{
       
  3478     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  3479 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  3480     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  3481 #else
       
  3482     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  3483 #endif
       
  3484 	}
       
  3485 
       
  3486 
       
  3487 TVerdict CCommsdat361Step::doTestStepL()
       
  3488 /**
       
  3489  * @return - TVerdict code
       
  3490  * delete the network weigthing  field of the iap record
       
  3491  * delete is called on a field container
       
  3492  */
       
  3493 	{
       
  3494     SetTestStepResult(EFail);
       
  3495     CreateSessionsL();
       
  3496     
       
  3497     CMDBField<TInt>* iapnetworkWeightingField = new(ELeave)CMDBField<TInt>(KCDTIdIAPNetworkWeighting);
       
  3498     CleanupStack::PushL(iapnetworkWeightingField);
       
  3499     iapnetworkWeightingField->SetRecordId(11);
       
  3500     
       
  3501     iapnetworkWeightingField->DeleteL(*iCDSession_v11);
       
  3502 	
       
  3503     CleanupStack::PopAndDestroy(iapnetworkWeightingField);
       
  3504     
       
  3505     CCDIAPRecord* iapRec1 = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  3506     CleanupStack::PushL(iapRec1);
       
  3507     
       
  3508     CCDAccessPointRecord* associatedLinkAP = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord));
       
  3509     CleanupStack::PushL(associatedLinkAP);
       
  3510     
       
  3511     iapRec1->SetRecordId(11);
       
  3512     associatedLinkAP->iRecordTag = 11;
       
  3513     
       
  3514     iapRec1->LoadL(*iCDSession_v11);
       
  3515     
       
  3516     if (associatedLinkAP->FindL(*iCDSession_vLatest))
       
  3517     	{
       
  3518     	TPtrC serviceTypeName(iapRec1->iServiceType);
       
  3519     	TPtrC apRecName(associatedLinkAP->iRecordName);
       
  3520     	
       
  3521     	_LIT(KExpectedAPName, "pppMappedFromIAP11");
       
  3522     	
       
  3523     	if ( 0 == serviceTypeName.Compare(TPtrC(DIAL_OUT_ISP)) &&
       
  3524     		 2 == iapRec1->iService &&
       
  3525     		 0 == iapRec1->iNetworkWeighting &&
       
  3526     		 0 == apRecName.Compare(KExpectedAPName) &&
       
  3527     		 0 == associatedLinkAP->iSelectionPolicy &&
       
  3528     		 0x11800300 == associatedLinkAP->iTier &&
       
  3529     		 0x12000300 == associatedLinkAP->iMCpr &&
       
  3530     		 0x12800300 == associatedLinkAP->iCpr &&
       
  3531     		 0x13000500 == associatedLinkAP->iSCpr &&
       
  3532     		 0x13800300 == associatedLinkAP->iProtocol &&
       
  3533     		 0 == associatedLinkAP->iCprConfig &&
       
  3534     		 0 == associatedLinkAP->iAppSID &&
       
  3535     		 0 == associatedLinkAP->iCustomSelectionPolicy )
       
  3536     		{
       
  3537     		SetTestStepResult(EPass);
       
  3538     		}
       
  3539     	}
       
  3540     
       
  3541     CleanupStack::PopAndDestroy(associatedLinkAP);
       
  3542     CleanupStack::PopAndDestroy(iapRec1);
       
  3543     
       
  3544     return TestStepResult();
       
  3545 	}
       
  3546 
       
  3547 //----------------------------------------------------------------------------------------------------------------
       
  3548 CCommsdat362Step::CCommsdat362Step()/**
       
  3549  * Constructor
       
  3550  */
       
  3551 	{
       
  3552 	SetTestStepName(KCommsdat362Step);
       
  3553 	}
       
  3554 
       
  3555 CCommsdat362Step::~CCommsdat362Step()
       
  3556 /**
       
  3557  * Destructor
       
  3558  */
       
  3559 	{
       
  3560 	delete iCDSession_v11;
       
  3561 	delete iCDSession_vLatest;
       
  3562 	}
       
  3563 
       
  3564 TVerdict CCommsdat362Step::doTestStepPreambleL()
       
  3565 	{
       
  3566 	SetTestStepResult(EPass);
       
  3567 	return TestStepResult();
       
  3568 	}
       
  3569 
       
  3570 TVerdict CCommsdat362Step::doTestStepPostambleL()
       
  3571 	{
       
  3572 	return TestStepResult();
       
  3573 	}
       
  3574 
       
  3575 void CCommsdat362Step::CreateSessionsL()
       
  3576 	{
       
  3577     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  3578 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  3579     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  3580 #else
       
  3581     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  3582 #endif
       
  3583 	}
       
  3584 
       
  3585 
       
  3586 TVerdict CCommsdat362Step::doTestStepL()
       
  3587 /**
       
  3588  * @return - TVerdict code
       
  3589  * delete the bearer field of the iap record
       
  3590  * delete is called on a field container
       
  3591  * 
       
  3592  * NOTE: This case shouldn't be allowed since a linked field is set to 0. But because of BC reasons we have to allow
       
  3593  * this. There are test steps in the CommdbShim (24_03, 24_04, 24_07, 24_08) where a linked field in the GlobalSettings
       
  3594  * record is set to 0 explicitly!!!!
       
  3595  */
       
  3596 	{
       
  3597     SetTestStepResult(EFail);
       
  3598     CreateSessionsL();
       
  3599     
       
  3600     CMDBField<TInt>* iapBearerField = new(ELeave)CMDBField<TInt>(KCDTIdIAPBearer);
       
  3601     CleanupStack::PushL(iapBearerField);
       
  3602     iapBearerField->SetRecordId(12);
       
  3603     
       
  3604     iapBearerField->DeleteL(*iCDSession_v11);
       
  3605     
       
  3606     CleanupStack::PopAndDestroy(iapBearerField);
       
  3607     
       
  3608     CCDIAPRecord* iapRec1 = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  3609     CleanupStack::PushL(iapRec1);
       
  3610     
       
  3611     CCDAccessPointRecord* associatedLinkAP = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord));
       
  3612     CleanupStack::PushL(associatedLinkAP);
       
  3613     
       
  3614     iapRec1->SetRecordId(12);
       
  3615     associatedLinkAP->iRecordTag = 12;
       
  3616     
       
  3617     iapRec1->LoadL(*iCDSession_v11);
       
  3618     
       
  3619     if (associatedLinkAP->FindL(*iCDSession_vLatest))
       
  3620     	{
       
  3621     	TPtrC bearerTypeName(iapRec1->iBearerType);
       
  3622     	TPtrC apRecName(associatedLinkAP->iRecordName);
       
  3623     	
       
  3624     	_LIT(KExpectedAPName, "pppMappedFromIAP12");
       
  3625     	
       
  3626     	if ( 0 == bearerTypeName.Compare(TPtrC(MODEM_BEARER)) &&
       
  3627     		 0 == iapRec1->iBearer &&
       
  3628     		 0 == apRecName.Compare(KExpectedAPName) &&
       
  3629     		 0 == associatedLinkAP->iSelectionPolicy &&
       
  3630     		 0x11800300 == associatedLinkAP->iTier &&
       
  3631     		 0x12000300 == associatedLinkAP->iMCpr &&
       
  3632     		 0x12800300 == associatedLinkAP->iCpr &&
       
  3633     		 0x13000500 == associatedLinkAP->iSCpr &&
       
  3634     		 0x13800300 == associatedLinkAP->iProtocol &&
       
  3635     		 0 == associatedLinkAP->iCprConfig &&
       
  3636     		 0 == associatedLinkAP->iAppSID &&
       
  3637     		 0 == associatedLinkAP->iCustomSelectionPolicy )
       
  3638     		{
       
  3639     		SetTestStepResult(EPass);
       
  3640     		}
       
  3641     	}
       
  3642     
       
  3643     CleanupStack::PopAndDestroy(associatedLinkAP);
       
  3644     CleanupStack::PopAndDestroy(iapRec1);
       
  3645     
       
  3646     return TestStepResult();
       
  3647 	}
       
  3648 
       
  3649 //----------------------------------------------------------------------------------------------------------------
       
  3650 CCommsdat363Step::CCommsdat363Step()/**
       
  3651  * Constructor
       
  3652  */
       
  3653 	{
       
  3654 	SetTestStepName(KCommsdat363Step);
       
  3655 	}
       
  3656 
       
  3657 CCommsdat363Step::~CCommsdat363Step()
       
  3658 /**
       
  3659  * Destructor
       
  3660  */
       
  3661 	{
       
  3662 	delete iCDSession_v11;
       
  3663 	delete iCDSession_vLatest;
       
  3664 	}
       
  3665 
       
  3666 TVerdict CCommsdat363Step::doTestStepPreambleL()
       
  3667 	{
       
  3668 	SetTestStepResult(EPass);
       
  3669 	return TestStepResult();
       
  3670 	}
       
  3671 
       
  3672 TVerdict CCommsdat363Step::doTestStepPostambleL()
       
  3673 	{
       
  3674 	return TestStepResult();
       
  3675 	}
       
  3676 
       
  3677 void CCommsdat363Step::CreateSessionsL()
       
  3678 	{
       
  3679     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  3680     iCDSession_vLatest = NULL;
       
  3681 	}
       
  3682 
       
  3683 
       
  3684 TVerdict CCommsdat363Step::doTestStepL()
       
  3685 /**
       
  3686  * @return - TVerdict code
       
  3687  * Change the lanserviceextension recordId in the lanservice record
       
  3688  * Modify is called on a record container
       
  3689  */
       
  3690 	{
       
  3691     SetTestStepResult(EFail);
       
  3692     CreateSessionsL();
       
  3693     
       
  3694     CCDLANServiceRecord* lanServiceRec = static_cast<CCDLANServiceRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdLANServiceRecord));
       
  3695     CleanupStack::PushL(lanServiceRec);
       
  3696     lanServiceRec->SetRecordId(2);
       
  3697     
       
  3698     lanServiceRec->LoadL(*iCDSession_v11);
       
  3699     
       
  3700     lanServiceRec->iServiceExtensionTableRecordId = 2;
       
  3701     
       
  3702     lanServiceRec->ModifyL(*iCDSession_v11);
       
  3703     
       
  3704     CleanupStack::PopAndDestroy(lanServiceRec);
       
  3705 
       
  3706     CCDLANServiceRecord* lanServiceRec1 = static_cast<CCDLANServiceRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdLANServiceRecord));
       
  3707     CleanupStack::PushL(lanServiceRec1);
       
  3708     lanServiceRec1->SetRecordId(2);
       
  3709     
       
  3710     lanServiceRec1->LoadL(*iCDSession_v11);
       
  3711     
       
  3712     if (2 == lanServiceRec1->iServiceExtensionTableRecordId)
       
  3713     	{
       
  3714     	SetTestStepResult(EPass);
       
  3715     	}
       
  3716     
       
  3717     CleanupStack::PopAndDestroy(lanServiceRec1);
       
  3718     
       
  3719     return TestStepResult();
       
  3720 	}
       
  3721 
       
  3722 //----------------------------------------------------------------------------------------------------------------
       
  3723 CCommsdat364Step::CCommsdat364Step()/**
       
  3724  * Constructor
       
  3725  */
       
  3726 	{
       
  3727 	SetTestStepName(KCommsdat364Step);
       
  3728 	}
       
  3729 
       
  3730 CCommsdat364Step::~CCommsdat364Step()
       
  3731 /**
       
  3732  * Destructor
       
  3733  */
       
  3734 	{
       
  3735 	delete iCDSession_v11;
       
  3736 	delete iCDSession_vLatest;
       
  3737 	}
       
  3738 
       
  3739 TVerdict CCommsdat364Step::doTestStepPreambleL()
       
  3740 	{
       
  3741 	SetTestStepResult(EPass);
       
  3742 	return TestStepResult();
       
  3743 	}
       
  3744 
       
  3745 TVerdict CCommsdat364Step::doTestStepPostambleL()
       
  3746 	{
       
  3747 	return TestStepResult();
       
  3748 	}
       
  3749 
       
  3750 void CCommsdat364Step::CreateSessionsL()
       
  3751 	{
       
  3752     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  3753     iCDSession_vLatest = NULL;
       
  3754 	}
       
  3755 
       
  3756 
       
  3757 TVerdict CCommsdat364Step::doTestStepL()
       
  3758 /**
       
  3759  * @return - TVerdict code
       
  3760  * Change the lanserviceextension recordId in the lanservice record
       
  3761  * Modify is called on a field container
       
  3762  */
       
  3763 	{
       
  3764     SetTestStepResult(EFail);
       
  3765     CreateSessionsL();
       
  3766     
       
  3767     CMDBField<TInt>* lanServiceRecIdField = new(ELeave)CMDBField<TInt>(KCDTIdLANServiceExtensionTableRecordId);
       
  3768     CleanupStack::PushL(lanServiceRecIdField);
       
  3769     lanServiceRecIdField->SetRecordId(2);
       
  3770     
       
  3771     *lanServiceRecIdField = 2;
       
  3772     
       
  3773     lanServiceRecIdField->ModifyL(*iCDSession_v11);
       
  3774     
       
  3775     CleanupStack::PopAndDestroy(lanServiceRecIdField);
       
  3776 
       
  3777     CCDLANServiceRecord* lanServiceRec1 = static_cast<CCDLANServiceRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdLANServiceRecord));
       
  3778     CleanupStack::PushL(lanServiceRec1);
       
  3779     lanServiceRec1->SetRecordId(2);
       
  3780     
       
  3781     lanServiceRec1->LoadL(*iCDSession_v11);
       
  3782     
       
  3783     if (2 == lanServiceRec1->iServiceExtensionTableRecordId)
       
  3784     	{
       
  3785     	SetTestStepResult(EPass);
       
  3786     	}
       
  3787     
       
  3788     CleanupStack::PopAndDestroy(lanServiceRec1);
       
  3789     
       
  3790     return TestStepResult();
       
  3791 	}
       
  3792 
       
  3793 //----------------------------------------------------------------------------------------------------------------
       
  3794 CCommsdat365Step::CCommsdat365Step()/**
       
  3795  * Constructor
       
  3796  */
       
  3797 	{
       
  3798 	SetTestStepName(KCommsdat365Step);
       
  3799 	}
       
  3800 
       
  3801 CCommsdat365Step::~CCommsdat365Step()
       
  3802 /**
       
  3803  * Destructor
       
  3804  */
       
  3805 	{
       
  3806 	delete iCDSession_v11;
       
  3807 	delete iCDSession_vLatest;
       
  3808 	}
       
  3809 
       
  3810 TVerdict CCommsdat365Step::doTestStepPreambleL()
       
  3811 	{
       
  3812 	SetTestStepResult(EPass);
       
  3813 	return TestStepResult();
       
  3814 	}
       
  3815 
       
  3816 TVerdict CCommsdat365Step::doTestStepPostambleL()
       
  3817 	{
       
  3818 	return TestStepResult();
       
  3819 	}
       
  3820 
       
  3821 void CCommsdat365Step::CreateSessionsL()
       
  3822 	{
       
  3823     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  3824     iCDSession_vLatest = NULL;
       
  3825 	}
       
  3826 
       
  3827 
       
  3828 TVerdict CCommsdat365Step::doTestStepL()
       
  3829 /**
       
  3830  * @return - TVerdict code
       
  3831  * Change the ISP recordId in the proxies record
       
  3832  * Modify is called on a record container
       
  3833  */
       
  3834 	{
       
  3835     SetTestStepResult(EFail);
       
  3836     CreateSessionsL();
       
  3837     
       
  3838     CCDProxiesRecord* proxiesRec = static_cast<CCDProxiesRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdProxiesRecord));
       
  3839     CleanupStack::PushL(proxiesRec);
       
  3840     proxiesRec->SetRecordId(1);
       
  3841     
       
  3842     proxiesRec->LoadL(*iCDSession_v11);
       
  3843     
       
  3844     proxiesRec->iService = 2;
       
  3845     
       
  3846     proxiesRec->ModifyL(*iCDSession_v11);
       
  3847     
       
  3848     CleanupStack::PopAndDestroy(proxiesRec);
       
  3849 
       
  3850     CCDProxiesRecord* proxiesRec1 = static_cast<CCDProxiesRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdProxiesRecord));
       
  3851     CleanupStack::PushL(proxiesRec1);
       
  3852     proxiesRec1->SetRecordId(1);
       
  3853     
       
  3854     proxiesRec1->LoadL(*iCDSession_v11);
       
  3855     
       
  3856     if (2 == proxiesRec1->iService)
       
  3857     	{
       
  3858     	SetTestStepResult(EPass);
       
  3859     	}
       
  3860     
       
  3861     CleanupStack::PopAndDestroy(proxiesRec1);
       
  3862     
       
  3863     return TestStepResult();
       
  3864 	}
       
  3865 
       
  3866 //----------------------------------------------------------------------------------------------------------------
       
  3867 CCommsdat366Step::CCommsdat366Step()/**
       
  3868  * Constructor
       
  3869  */
       
  3870 	{
       
  3871 	SetTestStepName(KCommsdat366Step);
       
  3872 	}
       
  3873 
       
  3874 CCommsdat366Step::~CCommsdat366Step()
       
  3875 /**
       
  3876  * Destructor
       
  3877  */
       
  3878 	{
       
  3879 	delete iCDSession_v11;
       
  3880 	delete iCDSession_vLatest;
       
  3881 	}
       
  3882 
       
  3883 TVerdict CCommsdat366Step::doTestStepPreambleL()
       
  3884 	{
       
  3885 	SetTestStepResult(EPass);
       
  3886 	return TestStepResult();
       
  3887 	}
       
  3888 
       
  3889 TVerdict CCommsdat366Step::doTestStepPostambleL()
       
  3890 	{
       
  3891 	return TestStepResult();
       
  3892 	}
       
  3893 
       
  3894 void CCommsdat366Step::CreateSessionsL()
       
  3895 	{
       
  3896     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  3897     iCDSession_vLatest = NULL;
       
  3898 	}
       
  3899 
       
  3900 
       
  3901 TVerdict CCommsdat366Step::doTestStepL()
       
  3902 /**
       
  3903  * @return - TVerdict code
       
  3904  * Change the ISP recordId in the proxies record
       
  3905  * Modify is called on a record container
       
  3906  */
       
  3907 	{
       
  3908     SetTestStepResult(EFail);
       
  3909     CreateSessionsL();
       
  3910     
       
  3911     CMDBField<TInt>* proxiesISPField = new(ELeave)CMDBField<TInt>(KCDTIdISP);
       
  3912     CleanupStack::PushL(proxiesISPField);
       
  3913     proxiesISPField->SetRecordId(1);
       
  3914     
       
  3915     *proxiesISPField = 3;
       
  3916     
       
  3917     proxiesISPField->ModifyL(*iCDSession_v11);
       
  3918     
       
  3919     CleanupStack::PopAndDestroy(proxiesISPField);
       
  3920 
       
  3921     CCDProxiesRecord* proxiesRec1 = static_cast<CCDProxiesRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdProxiesRecord));
       
  3922     CleanupStack::PushL(proxiesRec1);
       
  3923     proxiesRec1->SetRecordId(1);
       
  3924     
       
  3925     proxiesRec1->LoadL(*iCDSession_v11);
       
  3926     
       
  3927     if (3 == proxiesRec1->iService)
       
  3928     	{
       
  3929     	SetTestStepResult(EPass);
       
  3930     	}
       
  3931     
       
  3932     CleanupStack::PopAndDestroy(proxiesRec1);
       
  3933     
       
  3934     return TestStepResult();
       
  3935 	}
       
  3936 
       
  3937 //----------------------------------------------------------------------------------------------------------------
       
  3938 
       
  3939 CCommsdat367Step::CCommsdat367Step()/**
       
  3940  * Constructor
       
  3941  */
       
  3942 	{
       
  3943 	SetTestStepName(KCommsdat367Step);
       
  3944 	}
       
  3945 
       
  3946 CCommsdat367Step::~CCommsdat367Step()
       
  3947 /**
       
  3948  * Destructor
       
  3949  */
       
  3950 	{
       
  3951 	delete iCDSession_v11;
       
  3952 	delete iCDSession_vLatest;
       
  3953 	}
       
  3954 
       
  3955 TVerdict CCommsdat367Step::doTestStepPreambleL()
       
  3956 	{
       
  3957 	SetTestStepResult(EPass);
       
  3958 	return TestStepResult();
       
  3959 	}
       
  3960 
       
  3961 TVerdict CCommsdat367Step::doTestStepPostambleL()
       
  3962 	{
       
  3963 	return TestStepResult();
       
  3964 	}
       
  3965 
       
  3966 void CCommsdat367Step::CreateSessionsL()
       
  3967 	{
       
  3968     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  3969 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  3970     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  3971 #else
       
  3972     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  3973 #endif
       
  3974 	}
       
  3975 
       
  3976 
       
  3977 TVerdict CCommsdat367Step::doTestStepL()
       
  3978 /**
       
  3979  * @return - TVerdict code
       
  3980  * Change bearer in the IAP record
       
  3981  * Modify is called on a field container
       
  3982  */
       
  3983 	{
       
  3984     SetTestStepResult(EFail);
       
  3985     CreateSessionsL();
       
  3986     
       
  3987     CMDBField<TInt>* IAPBearerField = new(ELeave)CMDBField<TInt>(KCDTIdIAPBearer);
       
  3988     CleanupStack::PushL(IAPBearerField);
       
  3989     IAPBearerField->SetRecordId(1);
       
  3990     
       
  3991     *IAPBearerField = 11;
       
  3992     
       
  3993     IAPBearerField->ModifyL(*iCDSession_v11);
       
  3994     
       
  3995     CleanupStack::PopAndDestroy(IAPBearerField);
       
  3996 
       
  3997     CCDIAPRecord* iapRec1 = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  3998     CleanupStack::PushL(iapRec1);
       
  3999     
       
  4000     CCDAccessPointRecord* associatedLinkAP = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord));
       
  4001     CleanupStack::PushL(associatedLinkAP);
       
  4002     
       
  4003     iapRec1->SetRecordId(1);
       
  4004     associatedLinkAP->iRecordTag = 1;
       
  4005     
       
  4006     iapRec1->LoadL(*iCDSession_v11);
       
  4007     
       
  4008     if (associatedLinkAP->FindL(*iCDSession_vLatest))
       
  4009     	{
       
  4010     	TPtrC bearerTypeName(iapRec1->iBearerType);
       
  4011     	TPtrC apRecName(associatedLinkAP->iRecordName);
       
  4012     	
       
  4013     	_LIT(KExpectedAPName, "rawipMappedFromIAP1");
       
  4014     	
       
  4015     	if ( 0 == bearerTypeName.Compare(TPtrC(MODEM_BEARER)) &&
       
  4016     		 11 == iapRec1->iBearer &&
       
  4017     		 0 == iapRec1->iNetworkWeighting &&
       
  4018     		 0 == apRecName.Compare(KExpectedAPName) &&
       
  4019     		 0 == associatedLinkAP->iSelectionPolicy &&
       
  4020     		 0x11800300 == associatedLinkAP->iTier &&
       
  4021     		 0x12000500 == associatedLinkAP->iMCpr &&
       
  4022     		 0x12800300 == associatedLinkAP->iCpr &&
       
  4023     		 0x13000300 == associatedLinkAP->iSCpr &&
       
  4024     		 0x13800500 == associatedLinkAP->iProtocol &&
       
  4025     		 0 == associatedLinkAP->iCprConfig &&
       
  4026     		 0 == associatedLinkAP->iAppSID &&
       
  4027     		 0 == associatedLinkAP->iCustomSelectionPolicy )
       
  4028     		{
       
  4029     		SetTestStepResult(EPass);
       
  4030     		}
       
  4031     	}
       
  4032     
       
  4033     CleanupStack::PopAndDestroy(associatedLinkAP);
       
  4034     CleanupStack::PopAndDestroy(iapRec1);
       
  4035     
       
  4036     return TestStepResult();
       
  4037 	}
       
  4038 
       
  4039 //----------------------------------------------------------------------------------------------------------------
       
  4040 CCommsdat368Step::CCommsdat368Step()/**
       
  4041  * Constructor
       
  4042  */
       
  4043 	{
       
  4044 	SetTestStepName(KCommsdat368Step);
       
  4045 	}
       
  4046 
       
  4047 CCommsdat368Step::~CCommsdat368Step()
       
  4048 /**
       
  4049  * Destructor
       
  4050  */
       
  4051 	{
       
  4052 	delete iCDSession_v11;
       
  4053 	delete iCDSession_vLatest;
       
  4054 	}
       
  4055 
       
  4056 TVerdict CCommsdat368Step::doTestStepPreambleL()
       
  4057 	{
       
  4058 	SetTestStepResult(EPass);
       
  4059 	return TestStepResult();
       
  4060 	}
       
  4061 
       
  4062 TVerdict CCommsdat368Step::doTestStepPostambleL()
       
  4063 	{
       
  4064 	return TestStepResult();
       
  4065 	}
       
  4066 
       
  4067 void CCommsdat368Step::CreateSessionsL()
       
  4068 	{
       
  4069     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  4070 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  4071     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  4072 #else
       
  4073     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  4074 #endif
       
  4075 	}
       
  4076 
       
  4077 
       
  4078 TVerdict CCommsdat368Step::doTestStepL()
       
  4079 /**
       
  4080  * @return - TVerdict code
       
  4081  * Change service in the IAP record
       
  4082  * Modify is called on a field container
       
  4083  */
       
  4084 	{
       
  4085     SetTestStepResult(EFail);
       
  4086     CreateSessionsL();
       
  4087     
       
  4088     CMDBField<TInt>* IAPServiceField = new(ELeave)CMDBField<TInt>(KCDTIdIAPService);
       
  4089     CleanupStack::PushL(IAPServiceField);
       
  4090     IAPServiceField->SetRecordId(2);
       
  4091     
       
  4092     *IAPServiceField = 2;
       
  4093     
       
  4094     IAPServiceField->ModifyL(*iCDSession_v11);
       
  4095     
       
  4096     CleanupStack::PopAndDestroy(IAPServiceField);
       
  4097 
       
  4098     CCDIAPRecord* iapRec1 = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  4099     CleanupStack::PushL(iapRec1);
       
  4100     
       
  4101     CCDAccessPointRecord* associatedLinkAP = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord));
       
  4102     CleanupStack::PushL(associatedLinkAP);
       
  4103     
       
  4104     iapRec1->SetRecordId(2);
       
  4105     associatedLinkAP->iRecordTag = 2;
       
  4106     
       
  4107     iapRec1->LoadL(*iCDSession_v11);
       
  4108     
       
  4109     if (associatedLinkAP->FindL(*iCDSession_vLatest))
       
  4110     	{
       
  4111     	TPtrC serviceTypeName(iapRec1->iServiceType);
       
  4112     	TPtrC apRecName(associatedLinkAP->iRecordName);
       
  4113     	
       
  4114     	_LIT(KExpectedAPName, "ethintMappedFromIAP2");
       
  4115     	
       
  4116     	if ( 0 == serviceTypeName.Compare(TPtrC(LAN_SERVICE)) &&
       
  4117     		 2 == iapRec1->iService &&
       
  4118     		 0 == iapRec1->iNetworkWeighting &&
       
  4119     		 0 == apRecName.Compare(KExpectedAPName) &&
       
  4120     		 0 == associatedLinkAP->iSelectionPolicy &&
       
  4121     		 0x11800300 == associatedLinkAP->iTier &&
       
  4122     		 0x12000400 == associatedLinkAP->iMCpr &&
       
  4123     		 0x12800300 == associatedLinkAP->iCpr &&
       
  4124     		 0x13000300 == associatedLinkAP->iSCpr &&
       
  4125     		 0x13800400 == associatedLinkAP->iProtocol &&
       
  4126     		 0 == associatedLinkAP->iCprConfig &&
       
  4127     		 0 == associatedLinkAP->iAppSID &&
       
  4128     		 0 == associatedLinkAP->iCustomSelectionPolicy )
       
  4129     		{
       
  4130     		SetTestStepResult(EPass);
       
  4131     		}
       
  4132     	}
       
  4133     
       
  4134     CleanupStack::PopAndDestroy(associatedLinkAP);
       
  4135     CleanupStack::PopAndDestroy(iapRec1);
       
  4136     
       
  4137     return TestStepResult();
       
  4138 	}
       
  4139 
       
  4140 //----------------------------------------------------------------------------------------------------------------
       
  4141 CCommsdat369Step::CCommsdat369Step()/**
       
  4142  * Constructor
       
  4143  */
       
  4144 	{
       
  4145 	SetTestStepName(KCommsdat369Step);
       
  4146 	}
       
  4147 
       
  4148 CCommsdat369Step::~CCommsdat369Step()
       
  4149 /**
       
  4150  * Destructor
       
  4151  */
       
  4152 	{
       
  4153 	delete iCDSession_v11;
       
  4154 	delete iCDSession_vLatest;
       
  4155 	}
       
  4156 
       
  4157 TVerdict CCommsdat369Step::doTestStepPreambleL()
       
  4158 	{
       
  4159 	SetTestStepResult(EPass);
       
  4160 	return TestStepResult();
       
  4161 	}
       
  4162 
       
  4163 TVerdict CCommsdat369Step::doTestStepPostambleL()
       
  4164 	{
       
  4165 	return TestStepResult();
       
  4166 	}
       
  4167 
       
  4168 void CCommsdat369Step::CreateSessionsL()
       
  4169 	{
       
  4170     iCDSession_v11 = NULL;
       
  4171 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  4172     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  4173 #else
       
  4174     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  4175 #endif
       
  4176 	}
       
  4177 
       
  4178 
       
  4179 TVerdict CCommsdat369Step::doTestStepL()
       
  4180 /**
       
  4181  * @return - TVerdict code
       
  4182  * Change the TierThredName field in the Tier record (valid name)
       
  4183  * Modify is called on a record container
       
  4184  */
       
  4185 	{
       
  4186     SetTestStepResult(EFail);
       
  4187     CreateSessionsL();
       
  4188     
       
  4189     _LIT(KNewTierName, "New Tier Name");
       
  4190     
       
  4191     CCDTierRecord* tierRec = static_cast<CCDTierRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdTierRecord));
       
  4192     CleanupStack::PushL(tierRec);
       
  4193     
       
  4194     tierRec->SetRecordId(1);
       
  4195     tierRec->LoadL(*iCDSession_vLatest);
       
  4196     
       
  4197     tierRec->iTierThreadName.SetMaxLengthL(KNewTierName().Length());
       
  4198     tierRec->iTierThreadName.SetL(KNewTierName);
       
  4199     
       
  4200     tierRec->ModifyL(*iCDSession_vLatest);
       
  4201     
       
  4202     CleanupStack::PopAndDestroy(tierRec);
       
  4203     
       
  4204     CCDTierRecord* tierRec1 = static_cast<CCDTierRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdTierRecord));
       
  4205     CleanupStack::PushL(tierRec1);
       
  4206     
       
  4207     tierRec1->SetRecordId(1);
       
  4208     tierRec1->LoadL(*iCDSession_vLatest);
       
  4209     
       
  4210     TPtrC tierThreadName(tierRec1->iTierThreadName);
       
  4211     if (0 == tierThreadName.Compare(KNewTierName))
       
  4212     	{
       
  4213     	SetTestStepResult(EPass);
       
  4214     	}
       
  4215     
       
  4216     CleanupStack::PopAndDestroy(tierRec1);
       
  4217     
       
  4218     return TestStepResult();
       
  4219 	}
       
  4220 
       
  4221 
       
  4222 //----------------------------------------------------------------------------------------------------------------
       
  4223 CCommsdat370Step::CCommsdat370Step()/**
       
  4224  * Constructor
       
  4225  */
       
  4226 	{
       
  4227 	SetTestStepName(KCommsdat370Step);
       
  4228 	}
       
  4229 
       
  4230 CCommsdat370Step::~CCommsdat370Step()
       
  4231 /**
       
  4232  * Destructor
       
  4233  */
       
  4234 	{
       
  4235 	delete iCDSession_v11;
       
  4236 	delete iCDSession_vLatest;
       
  4237 	}
       
  4238 
       
  4239 TVerdict CCommsdat370Step::doTestStepPreambleL()
       
  4240 	{
       
  4241 	SetTestStepResult(EPass);
       
  4242 	return TestStepResult();
       
  4243 	}
       
  4244 
       
  4245 TVerdict CCommsdat370Step::doTestStepPostambleL()
       
  4246 	{
       
  4247 	return TestStepResult();
       
  4248 	}
       
  4249 
       
  4250 void CCommsdat370Step::CreateSessionsL()
       
  4251 	{
       
  4252     iCDSession_v11 = NULL;
       
  4253 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  4254     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  4255 #else
       
  4256     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  4257 #endif
       
  4258 	}
       
  4259 
       
  4260 
       
  4261 TVerdict CCommsdat370Step::doTestStepL()
       
  4262 /**
       
  4263  * @return - TVerdict code
       
  4264  * Change the TierThredName field in the Tier record (invalid name)
       
  4265  * Modify is called on a record container
       
  4266  */
       
  4267 	{
       
  4268     SetTestStepResult(EFail);
       
  4269     CreateSessionsL();
       
  4270     
       
  4271     _LIT(KNewTierName, "New Tier Name which is longer than the permitted");
       
  4272     
       
  4273     CCDTierRecord* tierRec = static_cast<CCDTierRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdTierRecord));
       
  4274     CleanupStack::PushL(tierRec);
       
  4275     
       
  4276     tierRec->SetRecordId(1);
       
  4277     tierRec->LoadL(*iCDSession_vLatest);
       
  4278     
       
  4279     tierRec->iTierThreadName.SetMaxLengthL(KNewTierName().Length());
       
  4280     tierRec->iTierThreadName.SetL(KNewTierName);
       
  4281     
       
  4282     TRAPD(err, tierRec->ModifyL(*iCDSession_vLatest));
       
  4283     
       
  4284     if (KErrTooBig == err)
       
  4285     	{
       
  4286     	SetTestStepResult(EPass);
       
  4287     	}
       
  4288     
       
  4289     CleanupStack::PopAndDestroy(tierRec);
       
  4290     
       
  4291     return TestStepResult();
       
  4292     }
       
  4293 
       
  4294 //----------------------------------------------------------------------------------------------------------------
       
  4295 CCommsdat371Step::CCommsdat371Step()/**
       
  4296  * Constructor
       
  4297  */
       
  4298 	{
       
  4299 	SetTestStepName(KCommsdat371Step);
       
  4300 	}
       
  4301 
       
  4302 CCommsdat371Step::~CCommsdat371Step()
       
  4303 /**
       
  4304  * Destructor
       
  4305  */
       
  4306 	{
       
  4307 	delete iCDSession_v11;
       
  4308 	delete iCDSession_vLatest;
       
  4309 	}
       
  4310 
       
  4311 TVerdict CCommsdat371Step::doTestStepPreambleL()
       
  4312 	{
       
  4313 	SetTestStepResult(EPass);
       
  4314 	return TestStepResult();
       
  4315 	}
       
  4316 
       
  4317 TVerdict CCommsdat371Step::doTestStepPostambleL()
       
  4318 	{
       
  4319 	return TestStepResult();
       
  4320 	}
       
  4321 
       
  4322 void CCommsdat371Step::CreateSessionsL()
       
  4323 	{
       
  4324     iCDSession_v11 = NULL;
       
  4325 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  4326     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  4327 #else
       
  4328     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  4329 #endif
       
  4330 	}
       
  4331 
       
  4332 
       
  4333 TVerdict CCommsdat371Step::doTestStepL()
       
  4334 /**
       
  4335  * @return - TVerdict code
       
  4336  * Change the TierThredName field in the Tier record (valid name)
       
  4337  * Modify is called on a field container
       
  4338  */
       
  4339 	{
       
  4340     SetTestStepResult(EFail);
       
  4341     CreateSessionsL();
       
  4342     
       
  4343     _LIT(KNewTierName, "New Tier Name2");
       
  4344     
       
  4345     CMDBField<TDesC>* tierNameField = new(ELeave)CMDBField<TDesC>(KCDTIdTierThreadName);
       
  4346     CleanupStack::PushL(tierNameField);
       
  4347     
       
  4348     tierNameField->SetRecordId(2);
       
  4349     tierNameField->SetMaxLengthL(KNewTierName().Length());
       
  4350     tierNameField->SetL(KNewTierName);
       
  4351 
       
  4352     tierNameField->ModifyL(*iCDSession_vLatest);
       
  4353     
       
  4354     CleanupStack::PopAndDestroy(tierNameField);
       
  4355     
       
  4356     CCDTierRecord* tierRec1 = static_cast<CCDTierRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdTierRecord));
       
  4357     CleanupStack::PushL(tierRec1);
       
  4358     
       
  4359     tierRec1->SetRecordId(2);
       
  4360     tierRec1->LoadL(*iCDSession_vLatest);
       
  4361     
       
  4362     TPtrC tierThreadName(tierRec1->iTierThreadName);
       
  4363     if (0 == tierThreadName.Compare(KNewTierName))
       
  4364     	{
       
  4365     	SetTestStepResult(EPass);
       
  4366     	}
       
  4367     
       
  4368     CleanupStack::PopAndDestroy(tierRec1);
       
  4369     
       
  4370     return TestStepResult();
       
  4371     }
       
  4372 
       
  4373 //----------------------------------------------------------------------------------------------------------------
       
  4374 CCommsdat372Step::CCommsdat372Step()/**
       
  4375  * Constructor
       
  4376  */
       
  4377 	{
       
  4378 	SetTestStepName(KCommsdat372Step);
       
  4379 	}
       
  4380 
       
  4381 CCommsdat372Step::~CCommsdat372Step()
       
  4382 /**
       
  4383  * Destructor
       
  4384  */
       
  4385 	{
       
  4386 	delete iCDSession_v11;
       
  4387 	delete iCDSession_vLatest;
       
  4388 	}
       
  4389 
       
  4390 TVerdict CCommsdat372Step::doTestStepPreambleL()
       
  4391 	{
       
  4392 	SetTestStepResult(EPass);
       
  4393 	return TestStepResult();
       
  4394 	}
       
  4395 
       
  4396 TVerdict CCommsdat372Step::doTestStepPostambleL()
       
  4397 	{
       
  4398 	return TestStepResult();
       
  4399 	}
       
  4400 
       
  4401 void CCommsdat372Step::CreateSessionsL()
       
  4402 	{
       
  4403     iCDSession_v11 = NULL;
       
  4404 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  4405     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  4406 #else
       
  4407     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  4408 #endif
       
  4409 	}
       
  4410 
       
  4411 
       
  4412 TVerdict CCommsdat372Step::doTestStepL()
       
  4413 /**
       
  4414  * @return - TVerdict code
       
  4415  * Change the TierThredName field in the Tier record (valid name)
       
  4416  * Modify is called on a field container
       
  4417  */
       
  4418 	{
       
  4419     SetTestStepResult(EFail);
       
  4420     CreateSessionsL();
       
  4421     
       
  4422     _LIT(KNewTierName, "New Tier Name2 which is longer than the permitted");
       
  4423     
       
  4424     CMDBField<TDesC>* tierNameField = new(ELeave)CMDBField<TDesC>(KCDTIdTierThreadName);
       
  4425     CleanupStack::PushL(tierNameField);
       
  4426     
       
  4427     tierNameField->SetRecordId(2);
       
  4428     tierNameField->SetMaxLengthL(KNewTierName().Length());
       
  4429     tierNameField->SetL(KNewTierName);
       
  4430 
       
  4431     TRAPD(err, tierNameField->ModifyL(*iCDSession_vLatest));
       
  4432         
       
  4433     if (KErrTooBig == err)
       
  4434     	{
       
  4435     	SetTestStepResult(EPass);
       
  4436     	}
       
  4437     
       
  4438     CleanupStack::PopAndDestroy(tierNameField);
       
  4439     
       
  4440     return TestStepResult();
       
  4441     }
       
  4442 
       
  4443 //----------------------------------------------------------------------------------------------------------------
       
  4444 CCommsdat380Step::CCommsdat380Step()/**
       
  4445  * Constructor
       
  4446  */
       
  4447 	{
       
  4448 	SetTestStepName(KCommsdat380Step);
       
  4449 	}
       
  4450 
       
  4451 CCommsdat380Step::~CCommsdat380Step()
       
  4452 /**
       
  4453  * Destructor
       
  4454  */
       
  4455 	{
       
  4456 	delete iCDSession_v11;
       
  4457 	delete iCDSession_vLatest;
       
  4458 	}
       
  4459 
       
  4460 TVerdict CCommsdat380Step::doTestStepPreambleL()
       
  4461 	{
       
  4462 	SetTestStepResult(EPass);
       
  4463 	return TestStepResult();
       
  4464 	}
       
  4465 
       
  4466 TVerdict CCommsdat380Step::doTestStepPostambleL()
       
  4467 	{
       
  4468 	return TestStepResult();
       
  4469 	}
       
  4470 
       
  4471 void CCommsdat380Step::CreateSessionsL()
       
  4472 	{
       
  4473     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  4474 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  4475     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  4476 #else
       
  4477     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  4478 #endif
       
  4479 	}
       
  4480 
       
  4481 TVerdict CCommsdat380Step::doTestStepL()
       
  4482 /**
       
  4483  * @return - TVerdict code
       
  4484  * This teststep inserts a rank1 connpref record with prompting on. There is IAP
       
  4485  * record in the database.
       
  4486  * 
       
  4487  * Store is made on a record container
       
  4488  * 
       
  4489  */
       
  4490 	{
       
  4491     SetTestStepResult(EFail);
       
  4492     CreateSessionsL();
       
  4493     
       
  4494     const TInt KIPProtoTierLink = 0x11800200;
       
  4495     
       
  4496     CCDConnectionPrefsRecord* connPrefRec = static_cast<CCDConnectionPrefsRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord));
       
  4497     CleanupStack::PushL(connPrefRec);
       
  4498     
       
  4499     connPrefRec->SetRecordId(1);
       
  4500     connPrefRec->DeleteL(*iCDSession_v11);
       
  4501     
       
  4502     CleanupStack::PopAndDestroy(connPrefRec);
       
  4503     
       
  4504     //Here the default IPProto AP should be linked from the APPrioritySelPol and
       
  4505     //IPProto Tier records.
       
  4506     
       
  4507 	CCDAPPrioritySelectionPolicyRecord* apSelPolRec1 = static_cast<CCDAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord));
       
  4508 	CleanupStack::PushL(apSelPolRec1);
       
  4509 	
       
  4510 	apSelPolRec1->SetRecordId(254);
       
  4511 	apSelPolRec1->LoadL(*iCDSession_vLatest);
       
  4512 	
       
  4513 	CCDAccessPointRecord* ipprotoApRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord));
       
  4514 	CleanupStack::PushL(ipprotoApRec);
       
  4515 	
       
  4516 	ipprotoApRec->SetElementId(apSelPolRec1->iAp1);
       
  4517 	ipprotoApRec->LoadL(*iCDSession_vLatest);
       
  4518     
       
  4519 	if (1 == GetAPNumberL(KIPProtoTierLink, iCDSession_vLatest) &&
       
  4520 		CCDAccessPointRecord::KNoPolicy == ipprotoApRec->iCustomSelectionPolicy &&
       
  4521 		0 == ipprotoApRec->iCprConfig)
       
  4522 		{
       
  4523 	    //now insert an IAP record
       
  4524 		CCDIAPRecord *iapRecord = (CCDIAPRecord*)CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord);
       
  4525 		CleanupStack::PushL(iapRecord); 
       
  4526 		
       
  4527 		//Insert an IAP record; which will be referred by conn pref records
       
  4528 		iapRecord->SetRecordId(KIAPRecordId); 
       
  4529 		iapRecord->iServiceType.SetMaxLengthL(KMaxTextLength);
       
  4530 		iapRecord->iServiceType= TPtrC(DIAL_OUT_ISP);
       
  4531 		iapRecord->iService=2;
       
  4532 		iapRecord->iBearerType.SetMaxLengthL(KMaxTextLength);
       
  4533 		iapRecord->iBearerType=TPtrC(MODEM_BEARER);
       
  4534 		iapRecord->iBearer=3;
       
  4535 	    
       
  4536 		iapRecord->StoreL(*iCDSession_v11);
       
  4537 		
       
  4538 		CCDConnectionPrefsRecord *cpRecord = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord);
       
  4539 		CleanupStack::PushL(cpRecord);
       
  4540 		
       
  4541 		cpRecord->SetRecordId(2);
       
  4542 		cpRecord->iDefaultIAP = 0;
       
  4543 		cpRecord->iRanking = 1;
       
  4544 		cpRecord->iDirection = ECommDbConnectionDirectionOutgoing;
       
  4545 		cpRecord->iBearerSet = KCommDbBearerCSD;
       
  4546 		cpRecord->iDialogPref = ECommDbDialogPrefPrompt;
       
  4547 		
       
  4548 		cpRecord->StoreL(*iCDSession_v11);
       
  4549 		
       
  4550 		CleanupStack::PopAndDestroy(cpRecord);
       
  4551 		CleanupStack::PopAndDestroy(iapRecord);
       
  4552 	    
       
  4553 		if (1 == GetAPNumberL(KIPProtoTierLink, iCDSession_vLatest))
       
  4554 			{
       
  4555 			CCDConnectionPrefsRecord *cpRecord1 = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord);
       
  4556 			CleanupStack::PushL(cpRecord1);
       
  4557 			
       
  4558 			cpRecord1->SetRecordId(2);
       
  4559 			cpRecord1->LoadL(*iCDSession_v11);
       
  4560 			
       
  4561 			CCDAPPrioritySelectionPolicyRecord* apSelPolRec = static_cast<CCDAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord));
       
  4562 			CleanupStack::PushL(apSelPolRec);
       
  4563 			
       
  4564 			apSelPolRec->SetRecordId(254);
       
  4565 			apSelPolRec->LoadL(*iCDSession_vLatest);
       
  4566 			
       
  4567 			CCDAccessPointRecord* apRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord));
       
  4568 			CleanupStack::PushL(apRec);
       
  4569 			
       
  4570 			apRec->SetElementId(apSelPolRec->iAp1);
       
  4571 			apRec->LoadL(*iCDSession_vLatest);
       
  4572 			
       
  4573 			//the customSelPol is the calculated IAP and the CprConfig field is the 
       
  4574 			//elementID of the connpref record as it's a prompting record
       
  4575 			if ( KIAPRecordId == apRec->iCustomSelectionPolicy &&
       
  4576 			     apRec->iCprConfig == cpRecord1->ElementId() )
       
  4577 				{
       
  4578 				SetTestStepResult(EPass);
       
  4579 				}
       
  4580 			
       
  4581 			CleanupStack::PopAndDestroy(apRec);
       
  4582 			CleanupStack::PopAndDestroy(apSelPolRec);
       
  4583 			CleanupStack::PopAndDestroy(cpRecord1);
       
  4584 			}
       
  4585 		}
       
  4586 	
       
  4587 	CleanupStack::PopAndDestroy(ipprotoApRec);
       
  4588 	CleanupStack::PopAndDestroy(apSelPolRec1);
       
  4589 	
       
  4590     return TestStepResult();
       
  4591     }
       
  4592 
       
  4593 
       
  4594 //----------------------------------------------------------------------------------------------------------------
       
  4595 CCommsdat381Step::CCommsdat381Step()/**
       
  4596  * Constructor
       
  4597  */
       
  4598 	{
       
  4599 	SetTestStepName(KCommsdat381Step);
       
  4600 	}
       
  4601 
       
  4602 CCommsdat381Step::~CCommsdat381Step()
       
  4603 /**
       
  4604  * Destructor
       
  4605  */
       
  4606 	{
       
  4607 	delete iCDSession_v11;
       
  4608 	delete iCDSession_vLatest;
       
  4609 	}
       
  4610 
       
  4611 TVerdict CCommsdat381Step::doTestStepPreambleL()
       
  4612 	{
       
  4613 	SetTestStepResult(EPass);
       
  4614 	return TestStepResult();
       
  4615 	}
       
  4616 
       
  4617 TVerdict CCommsdat381Step::doTestStepPostambleL()
       
  4618 	{
       
  4619 	return TestStepResult();
       
  4620 	}
       
  4621 
       
  4622 void CCommsdat381Step::CreateSessionsL()
       
  4623 	{
       
  4624     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  4625 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  4626     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  4627 #else
       
  4628     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  4629 #endif
       
  4630 	}
       
  4631 
       
  4632 TVerdict CCommsdat381Step::doTestStepL()
       
  4633 /**
       
  4634  * @return - TVerdict code
       
  4635  * This teststep inserts a rank1 connpref record with prompting on. There is IAP
       
  4636  * record in the database.
       
  4637  * 
       
  4638  * Store is made on a record container
       
  4639  * 
       
  4640  */
       
  4641 	{
       
  4642     SetTestStepResult(EFail);
       
  4643     CreateSessionsL();
       
  4644 	
       
  4645     TBool goOn = EFalse;
       
  4646     
       
  4647     CCDIAPRecord *iapRecord = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  4648     CleanupStack::PushL(iapRecord); 
       
  4649     
       
  4650     iapRecord->iServiceType.SetMaxLengthL((TPtrC(KCDTypeNameLANService)).Length());
       
  4651     iapRecord->iServiceType.SetL( TPtrC( KCDTypeNameLANService ) );
       
  4652     iapRecord->iService=2;
       
  4653     
       
  4654     if ( (iapRecord->FindL(*iCDSession_v11)) &&
       
  4655     	 (9 == iapRecord->RecordId()) )
       
  4656     	{
       
  4657     	goOn = ETrue;
       
  4658     	}
       
  4659     
       
  4660     CleanupStack::PopAndDestroy(iapRecord);
       
  4661     
       
  4662     if (goOn)
       
  4663     	{
       
  4664     	iapRecord = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  4665 	    CleanupStack::PushL(iapRecord); 
       
  4666 	    
       
  4667 	    iapRecord->iService=2;
       
  4668 	    
       
  4669 	    if ( (iapRecord->FindL(*iCDSession_v11)) &&
       
  4670 	    	 (1 == iapRecord->RecordId()) )
       
  4671 	    	{
       
  4672 	    	SetTestStepResult(EPass);
       
  4673 	    	}
       
  4674 	    
       
  4675 	    CleanupStack::PopAndDestroy(iapRecord);
       
  4676     	}
       
  4677     
       
  4678     return TestStepResult();
       
  4679     }
       
  4680 
       
  4681 //----------------------------------------------------------------------------------------------------------------
       
  4682 CCommsdat382Step::CCommsdat382Step()/**
       
  4683  * Constructor
       
  4684  */
       
  4685 	{
       
  4686 	SetTestStepName(KCommsdat382Step);
       
  4687 	}
       
  4688 
       
  4689 CCommsdat382Step::~CCommsdat382Step()
       
  4690 /**
       
  4691  * Destructor
       
  4692  */
       
  4693 	{
       
  4694 	delete iCDSession_v11;
       
  4695 	delete iCDSession_vLatest;
       
  4696 	}
       
  4697 
       
  4698 TVerdict CCommsdat382Step::doTestStepPreambleL()
       
  4699 	{
       
  4700 	SetTestStepResult(EPass);
       
  4701 	return TestStepResult();
       
  4702 	}
       
  4703 
       
  4704 TVerdict CCommsdat382Step::doTestStepPostambleL()
       
  4705 	{
       
  4706 	return TestStepResult();
       
  4707 	}
       
  4708 
       
  4709 void CCommsdat382Step::CreateSessionsL()
       
  4710 	{
       
  4711     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  4712 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  4713     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  4714 #else
       
  4715     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  4716 #endif
       
  4717 	}
       
  4718 
       
  4719 TVerdict CCommsdat382Step::doTestStepL()
       
  4720 /**
       
  4721  * @return - TVerdict code
       
  4722  * This teststep inserts a rank1 connpref record with prompting on. There is IAP
       
  4723  * record in the database.
       
  4724  * 
       
  4725  * Store is made on a record container
       
  4726  * 
       
  4727  */
       
  4728 	{
       
  4729     SetTestStepResult(EFail);
       
  4730     CreateSessionsL();
       
  4731 	
       
  4732     TBool goOn = EFalse;
       
  4733     
       
  4734     CCDIAPRecord *iapRecord = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  4735     CleanupStack::PushL(iapRecord); 
       
  4736     
       
  4737     iapRecord->iBearerType.SetMaxLengthL((TPtrC(KCDTypeNameLANBearer)).Length());
       
  4738     iapRecord->iBearerType.SetL( TPtrC( KCDTypeNameLANBearer ) );
       
  4739     iapRecord->iBearer=2;
       
  4740     
       
  4741     if ( (iapRecord->FindL(*iCDSession_v11)) &&
       
  4742     	 (2 == iapRecord->RecordId()) )
       
  4743     	{
       
  4744     	goOn = ETrue;
       
  4745     	}
       
  4746     
       
  4747     CleanupStack::PopAndDestroy(iapRecord);
       
  4748     
       
  4749     if (goOn)
       
  4750     	{
       
  4751     	iapRecord = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
  4752 	    CleanupStack::PushL(iapRecord); 
       
  4753 	    
       
  4754 	    iapRecord->iBearer=3;
       
  4755 	    
       
  4756 	    if ( (iapRecord->FindL(*iCDSession_v11)) &&
       
  4757 	    	 (3 == iapRecord->RecordId()) )
       
  4758 	    	{
       
  4759 	    	SetTestStepResult(EPass);
       
  4760 	    	}
       
  4761 	    
       
  4762 	    CleanupStack::PopAndDestroy(iapRecord);
       
  4763     	}
       
  4764     
       
  4765     return TestStepResult();
       
  4766     }
       
  4767 
       
  4768 //----------------------------------------------------------------------------------------------------------------
       
  4769 CCommsdat383Step::CCommsdat383Step()/**
       
  4770  * Constructor
       
  4771  */
       
  4772 	{
       
  4773 	SetTestStepName(KCommsdat383Step);
       
  4774 	}
       
  4775 
       
  4776 CCommsdat383Step::~CCommsdat383Step()
       
  4777 /**
       
  4778  * Destructor
       
  4779  */
       
  4780 	{
       
  4781 	delete iCDSession_v11;
       
  4782 	delete iCDSession_vLatest;
       
  4783 	}
       
  4784 
       
  4785 TVerdict CCommsdat383Step::doTestStepPreambleL()
       
  4786 	{
       
  4787 	SetTestStepResult(EPass);
       
  4788 	return TestStepResult();
       
  4789 	}
       
  4790 
       
  4791 TVerdict CCommsdat383Step::doTestStepPostambleL()
       
  4792 	{
       
  4793 	return TestStepResult();
       
  4794 	}
       
  4795 
       
  4796 void CCommsdat383Step::CreateSessionsL()
       
  4797 	{
       
  4798     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  4799 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  4800     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  4801 #else
       
  4802     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  4803 #endif
       
  4804 	}
       
  4805 
       
  4806 TVerdict CCommsdat383Step::doTestStepL()
       
  4807 /**
       
  4808  * @return - TVerdict code
       
  4809  * This teststep inserts a rank1 connpref record with prompting on. There is IAP
       
  4810  * record in the database.
       
  4811  * 
       
  4812  * Store is made on a record container
       
  4813  * 
       
  4814  */
       
  4815 	{
       
  4816     SetTestStepResult(EFail);
       
  4817     CreateSessionsL();
       
  4818     TBool goOn = EFalse;
       
  4819     
       
  4820     CCDProxiesRecord *proxiesRecord = static_cast<CCDProxiesRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdProxiesRecord));
       
  4821     CleanupStack::PushL(proxiesRecord); 
       
  4822     
       
  4823     proxiesRecord->iServiceType.SetMaxLengthL((TPtrC(KCDTypeNameDialOutISP)).Length());
       
  4824     proxiesRecord->iServiceType.SetL( TPtrC( KCDTypeNameDialOutISP ) );
       
  4825     proxiesRecord->iService=4;
       
  4826     
       
  4827     if ( (proxiesRecord->FindL(*iCDSession_v11)) &&
       
  4828     	 (1 == proxiesRecord->RecordId()) )
       
  4829     	{
       
  4830     	goOn = ETrue;
       
  4831     	}
       
  4832     
       
  4833     CleanupStack::PopAndDestroy(proxiesRecord);
       
  4834     
       
  4835     if (goOn)
       
  4836     	{
       
  4837     	proxiesRecord = static_cast<CCDProxiesRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdProxiesRecord));
       
  4838     	CleanupStack::PushL(proxiesRecord); 
       
  4839 	    
       
  4840     	proxiesRecord->iService=6;
       
  4841 	    
       
  4842 	    if ( (proxiesRecord->FindL(*iCDSession_v11)) &&
       
  4843 	    	 (2 == proxiesRecord->RecordId()) )
       
  4844 	    	{
       
  4845 	    	SetTestStepResult(EPass);
       
  4846 	    	}
       
  4847 	    
       
  4848 	    CleanupStack::PopAndDestroy(proxiesRecord);
       
  4849     	}
       
  4850     
       
  4851     return TestStepResult();
       
  4852     }
       
  4853 
       
  4854 //----------------------------------------------------------------------------------------------------------------
       
  4855 CCommsdat384Step::CCommsdat384Step()/**
       
  4856  * Constructor
       
  4857  */
       
  4858 	{
       
  4859 	SetTestStepName(KCommsdat384Step);
       
  4860 	}
       
  4861 
       
  4862 CCommsdat384Step::~CCommsdat384Step()
       
  4863 /**
       
  4864  * Destructor
       
  4865  */
       
  4866 	{
       
  4867 	delete iCDSession_v11;
       
  4868 	delete iCDSession_vLatest;
       
  4869 	}
       
  4870 
       
  4871 TVerdict CCommsdat384Step::doTestStepPreambleL()
       
  4872 	{
       
  4873 	SetTestStepResult(EPass);
       
  4874 	return TestStepResult();
       
  4875 	}
       
  4876 
       
  4877 TVerdict CCommsdat384Step::doTestStepPostambleL()
       
  4878 	{
       
  4879 	return TestStepResult();
       
  4880 	}
       
  4881 
       
  4882 void CCommsdat384Step::CreateSessionsL()
       
  4883 	{
       
  4884     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  4885 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  4886     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  4887 #else
       
  4888     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  4889 #endif
       
  4890 	}
       
  4891 
       
  4892 TVerdict CCommsdat384Step::doTestStepL()
       
  4893 	{
       
  4894     SetTestStepResult(EFail);
       
  4895     CreateSessionsL();
       
  4896     TBool goOn = EFalse;
       
  4897     
       
  4898     CCDLANServiceRecord *lanServiceRecord = static_cast<CCDLANServiceRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdLANServiceRecord));
       
  4899     CleanupStack::PushL(lanServiceRecord); 
       
  4900     
       
  4901     lanServiceRecord->iServiceExtensionTableName.SetMaxLengthL((TPtrC(KCDTypeNamePANServiceExt)).Length());
       
  4902     lanServiceRecord->iServiceExtensionTableName.SetL( TPtrC( KCDTypeNamePANServiceExt ) );
       
  4903     lanServiceRecord->iServiceExtensionTableRecordId=1;
       
  4904     
       
  4905     if ( (lanServiceRecord->FindL(*iCDSession_v11)) &&
       
  4906     	 (6 == lanServiceRecord->RecordId()) )
       
  4907     	{
       
  4908     	SetTestStepResult(EPass);
       
  4909     	}
       
  4910     	
       
  4911     CleanupStack::PopAndDestroy(lanServiceRecord);
       
  4912     
       
  4913     if (goOn)
       
  4914     	{
       
  4915     	lanServiceRecord = static_cast<CCDLANServiceRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdLANServiceRecord));
       
  4916     	CleanupStack::PushL(lanServiceRecord); 
       
  4917 	    
       
  4918     	lanServiceRecord->iServiceExtensionTableRecordId=2;
       
  4919 	    
       
  4920 	    if ( (lanServiceRecord->FindL(*iCDSession_v11)) &&
       
  4921 	    	 (7 == lanServiceRecord->RecordId()) )
       
  4922 	    	{
       
  4923 	    	SetTestStepResult(EPass);
       
  4924 	    	}
       
  4925 	    
       
  4926 	    CleanupStack::PopAndDestroy(lanServiceRecord);
       
  4927     	}
       
  4928     
       
  4929     return TestStepResult();
       
  4930     }
       
  4931 
       
  4932 #endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  4933 
       
  4934 //----------------------------------------------------------------------------------------------------------------
       
  4935 CCommsdat385Step::CCommsdat385Step()/**
       
  4936  * Constructor
       
  4937  */
       
  4938 	{
       
  4939 	SetTestStepName(KCommsdat385Step);
       
  4940 	}
       
  4941 
       
  4942 CCommsdat385Step::~CCommsdat385Step()
       
  4943 /**
       
  4944  * Destructor
       
  4945  */
       
  4946 	{
       
  4947 	delete iCDSession_v11;
       
  4948 	delete iCDSession_vLatest;
       
  4949 	}
       
  4950 
       
  4951 TVerdict CCommsdat385Step::doTestStepPreambleL()
       
  4952 	{
       
  4953 	SetTestStepResult(EPass);
       
  4954 	return TestStepResult();
       
  4955 	}
       
  4956 
       
  4957 TVerdict CCommsdat385Step::doTestStepPostambleL()
       
  4958 	{
       
  4959 	return TestStepResult();
       
  4960 	}
       
  4961 
       
  4962 void CCommsdat385Step::CreateSessionsL()
       
  4963 	{
       
  4964     iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1);
       
  4965 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
  4966     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2);
       
  4967 #else
       
  4968     iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1);
       
  4969 #endif
       
  4970 	}
       
  4971 
       
  4972 TVerdict CCommsdat385Step::doTestStepL()
       
  4973 /**
       
  4974  * @return - TVerdict code
       
  4975  * Check that for each Link layer ap created, there is a equivalent ipproto layer ap
       
  4976  */
       
  4977 	{
       
  4978     SetTestStepResult(EFail);
       
  4979     CreateSessionsL();
       
  4980     
       
  4981     const TInt KIPProtoTierLink = 0x11800200;
       
  4982 	const TInt KLinkTierLink = 0x11800300;
       
  4983     
       
  4984 	if (GetAPNumberL(KLinkTierLink, iCDSession_vLatest) == GetAPNumberL(KIPProtoTierLink, iCDSession_vLatest))
       
  4985 		{
       
  4986 		SetTestStepResult(EPass);
       
  4987 		}
       
  4988 	
       
  4989     return TestStepResult();
       
  4990     }