commsconfig/commsdatabaseshim/ts_commdb/Step_040_xx.cpp
changeset 72 ae47d0499bee
parent 68 5da8188e392b
child 77 c9776eadbffd
equal deleted inserted replaced
68:5da8188e392b 72:ae47d0499bee
     1 // Copyright (c) 2001-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 // This contains CommDb Unit Test Cases 040.XX
       
    15 // 
       
    16 //
       
    17 
       
    18 // EPOC includes
       
    19 #include <e32base.h>
       
    20 #include <commdb.h>
       
    21 #include <d32comm.h>
       
    22 
       
    23 // Test system includes
       
    24 #include <networking/log.h>
       
    25 #include <networking/teststep.h>
       
    26 #include "Teststepcommdb.h"
       
    27 #include "TestSuiteCommdb.h"
       
    28 #include "Step_040_xx.h"
       
    29 
       
    30 
       
    31 CCommDbTest040_01::CCommDbTest040_01()
       
    32 	{
       
    33 	// store the name of this test case
       
    34 	iTestStepName = _L("step_040_01");
       
    35 	}
       
    36 
       
    37 CCommDbTest040_01::~CCommDbTest040_01()
       
    38 	{}
       
    39 
       
    40 TVerdict CCommDbTest040_01::doTestStepL( void )
       
    41 	{
       
    42 	executeStepL();
       
    43 	return EPass;	//If we've got this far we've passed
       
    44 	}
       
    45 
       
    46 TVerdict CCommDbTest040_01::doTestStepPreambleL()
       
    47 	{
       
    48 	return EPass;
       
    49 	}
       
    50 
       
    51 TInt CCommDbTest040_01::executeStepL()
       
    52 	{
       
    53 	iOverSet=CCommDbOverrideSettings::NewL(CCommDbOverrideSettings::EParamListPartial);
       
    54 	return KErrNone;
       
    55 	}
       
    56 	
       
    57 TVerdict CCommDbTest040_01::doTestStepPostambleL()
       
    58 	{
       
    59 	delete iOverSet;
       
    60 	return EPass;
       
    61 	}
       
    62 
       
    63 //
       
    64 
       
    65 CCommDbTest040_02::CCommDbTest040_02()
       
    66 	{
       
    67 	// store the name of this test case
       
    68 	iTestStepName = _L("step_040_02");
       
    69 	}
       
    70 
       
    71 CCommDbTest040_02::~CCommDbTest040_02()
       
    72 	{}
       
    73 
       
    74 TVerdict CCommDbTest040_02::doTestStepL( void )
       
    75 	{
       
    76 	executeStepL();
       
    77 	return EPass;	//If we've got this far we've passed
       
    78 	}
       
    79 
       
    80 TVerdict CCommDbTest040_02::doTestStepPreambleL()
       
    81 	{
       
    82 	return EPass;
       
    83 	}
       
    84 
       
    85 TInt CCommDbTest040_02::executeStepL()
       
    86 	{
       
    87 	iOverSet=CCommDbOverrideSettings::NewL(CCommDbOverrideSettings::EParamListFull);
       
    88 	return KErrNone;
       
    89 	}
       
    90 	
       
    91 TVerdict CCommDbTest040_02::doTestStepPostambleL()
       
    92 	{
       
    93 	delete iOverSet;
       
    94 	return EPass;
       
    95 	}
       
    96 
       
    97 //
       
    98 
       
    99 CCommDbTest040_03::CCommDbTest040_03()
       
   100 	{
       
   101 	// store the name of this test case
       
   102 	iTestStepName = _L("step_040_03");
       
   103 	}
       
   104 
       
   105 CCommDbTest040_03::~CCommDbTest040_03()
       
   106 	{}
       
   107 
       
   108 TVerdict CCommDbTest040_03::doTestStepL( void )
       
   109 	{
       
   110 	Log(_L("Step 040.03 called "));
       
   111 
       
   112 	iTestStepResult = EPass;
       
   113 
       
   114 	CCommDbTest040_01* step040_01 = new(ELeave) CCommDbTest040_01;
       
   115 	CleanupStack::PushL(step040_01);
       
   116 	step040_01->iSuite = iSuite;
       
   117 	doTestStepWithHeapFailureL( *step040_01, KErrNone);
       
   118 	CleanupStack::PopAndDestroy(step040_01);
       
   119 
       
   120 	CCommDbTest040_02* step040_02 = new(ELeave) CCommDbTest040_02;
       
   121 	CleanupStack::PushL(step040_02);
       
   122 	step040_02->iSuite = iSuite;
       
   123 	doTestStepWithHeapFailureL( *step040_02, KErrNone);
       
   124 	CleanupStack::PopAndDestroy(step040_02);
       
   125 	
       
   126 	return iTestStepResult;
       
   127 	}