commsconfig/commsdatabaseshim/TE_commdb/src/Step_040_xx.cpp
changeset 72 ae47d0499bee
equal deleted inserted replaced
68:5da8188e392b 72:ae47d0499bee
       
     1 //
       
     2 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 // All rights reserved.
       
     4 // This component and the accompanying materials are made available
       
     5 // under the terms of "Eclipse Public License v1.0"
       
     6 // which accompanies this distribution, and is available
       
     7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 //
       
     9 // Initial Contributors:
       
    10 // Nokia Corporation - initial contribution.
       
    11 //
       
    12 // Contributors:
       
    13 //
       
    14 // Description:
       
    15 //
       
    16 //
       
    17 //
       
    18 // This contains CommDb Unit Test Cases 040.XX
       
    19 
       
    20 // EPOC includes
       
    21 #include <e32base.h>
       
    22 #include <commdb.h>
       
    23 #include <d32comm.h>
       
    24 
       
    25 // Test system includes
       
    26 #include "Teststepcommdb.h"
       
    27 #include "Step_040_xx.h"
       
    28 
       
    29 
       
    30 CCommDbTest040_01::CCommDbTest040_01()
       
    31 	{
       
    32 	// store the name of this test case
       
    33 	SetTestStepName(_L("step_040_01"));
       
    34 	}
       
    35 
       
    36 CCommDbTest040_01::~CCommDbTest040_01()
       
    37 	{}
       
    38 
       
    39 TVerdict CCommDbTest040_01::doTestStepL( void )
       
    40 	{
       
    41 	executeStepL();
       
    42         SetTestStepResult(EPass);	return TestStepResult();	//If we've got this far we've passed
       
    43 	}
       
    44 
       
    45 TVerdict CCommDbTest040_01::doTestStepPreambleL()
       
    46 	{
       
    47         SetTestStepResult(EPass);	return TestStepResult();
       
    48 	}
       
    49 
       
    50 TInt CCommDbTest040_01::executeStepL()
       
    51 	{
       
    52 	iOverSet=CCommDbOverrideSettings::NewL(CCommDbOverrideSettings::EParamListPartial);
       
    53 	return KErrNone;
       
    54 	}
       
    55 	
       
    56 TVerdict CCommDbTest040_01::doTestStepPostambleL()
       
    57 	{
       
    58 	delete iOverSet;
       
    59         SetTestStepResult(EPass);	return TestStepResult();
       
    60 	}
       
    61 
       
    62 ////////////////////////////////////////////////////////////////////////////////////
       
    63 
       
    64 CCommDbTest040_02::CCommDbTest040_02()
       
    65 	{
       
    66 	// store the name of this test case
       
    67 	SetTestStepName(_L("step_040_02"));
       
    68 	}
       
    69 
       
    70 CCommDbTest040_02::~CCommDbTest040_02()
       
    71 	{}
       
    72 
       
    73 TVerdict CCommDbTest040_02::doTestStepL( void )
       
    74 	{
       
    75 	executeStepL();
       
    76         SetTestStepResult(EPass);	return TestStepResult();	//If we've got this far we've passed
       
    77 	}
       
    78 
       
    79 TVerdict CCommDbTest040_02::doTestStepPreambleL()
       
    80 	{
       
    81         SetTestStepResult(EPass);	return TestStepResult();
       
    82 	}
       
    83 
       
    84 TInt CCommDbTest040_02::executeStepL()
       
    85 	{
       
    86 	iOverSet=CCommDbOverrideSettings::NewL(CCommDbOverrideSettings::EParamListFull);
       
    87 	return KErrNone;
       
    88 	}
       
    89 	
       
    90 TVerdict CCommDbTest040_02::doTestStepPostambleL()
       
    91 	{
       
    92 	delete iOverSet;
       
    93         SetTestStepResult(EPass);	return TestStepResult();
       
    94 	}
       
    95 
       
    96 //////////////////////////////////////////////////////////////////////////
       
    97 
       
    98 CCommDbTest040_03::CCommDbTest040_03()
       
    99 	{
       
   100 	// store the name of this test case
       
   101 	SetTestStepName(_L("step_040_03"));
       
   102 	}
       
   103 
       
   104 CCommDbTest040_03::~CCommDbTest040_03()
       
   105 	{}
       
   106 
       
   107 TVerdict CCommDbTest040_03::doTestStepL( void )
       
   108 	{
       
   109 	INFO_PRINTF1(_L("Step 040.03 called "));
       
   110 
       
   111 	SetTestStepResult(EPass);
       
   112 	CCommDbTest040_01* step040_01 = new(ELeave) CCommDbTest040_01;
       
   113 	CleanupStack::PushL(step040_01);
       
   114 	doTestStepWithHeapFailureL( *step040_01, KErrNone);
       
   115 	CleanupStack::PopAndDestroy(step040_01);
       
   116 
       
   117 	CCommDbTest040_02* step040_02 = new(ELeave) CCommDbTest040_02;
       
   118 	CleanupStack::PushL(step040_02);
       
   119 	doTestStepWithHeapFailureL( *step040_02, KErrNone);
       
   120 	CleanupStack::PopAndDestroy(step040_02);
       
   121 	
       
   122 	return TestStepResult();
       
   123 	}