commsconfig/commsdatabaseshim/ts_commdb/Step_025_xx.cpp
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     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 025.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_025_xx.h"
       
    29 
       
    30 
       
    31 CCommDbTest025_01::CCommDbTest025_01()
       
    32 	{
       
    33 	// store the name of this test case
       
    34 	iTestStepName = _L("step_025_01");
       
    35 	}
       
    36 
       
    37 CCommDbTest025_01::~CCommDbTest025_01()
       
    38 	{}
       
    39 
       
    40 
       
    41 TVerdict CCommDbTest025_01::doTestStepL( void )
       
    42 	{
       
    43 	executeStepL();	//Always returns KErrNone or leaves.
       
    44 	return EPass;	//So if we got to here we must have passed.
       
    45 	}
       
    46 
       
    47 TInt CCommDbTest025_01::executeStepL()
       
    48 	{
       
    49 	iPrefView = iTheDb->OpenConnectionPrefTableLC();
       
    50 	CleanupStack::Pop();
       
    51 	return KErrNone;
       
    52 	}
       
    53 
       
    54 TVerdict CCommDbTest025_01::doTestStepPreambleL()
       
    55 	{
       
    56 	iTheDb=CCommsDatabase::NewL();
       
    57 	return EPass;
       
    58 	}
       
    59 
       
    60 TVerdict CCommDbTest025_01::doTestStepPostambleL()
       
    61 	{
       
    62 	delete iPrefView;
       
    63 	delete iTheDb;
       
    64 	iTheDb=NULL;
       
    65 	return EPass;
       
    66 	}
       
    67 
       
    68 //
       
    69 // Test 25.02
       
    70 //
       
    71 
       
    72 CCommDbTest025_02::CCommDbTest025_02()
       
    73 	{
       
    74 	// store the name of this test case
       
    75 	iTestStepName = _L("step_025_02");
       
    76 	}
       
    77 
       
    78 CCommDbTest025_02::~CCommDbTest025_02()
       
    79 	{}
       
    80 
       
    81 TVerdict CCommDbTest025_02::doTestStepL( void )
       
    82 	{
       
    83 	Log(_L("Step 025.02 called "));
       
    84 
       
    85 	iTestStepResult = EPass;
       
    86 
       
    87 	CCommDbTest025_01* step025_01 = new(ELeave) CCommDbTest025_01;
       
    88 	CleanupStack::PushL(step025_01);
       
    89 	step025_01->iSuite = iSuite;
       
    90 	doTestStepWithHeapFailureL( *step025_01, KErrNone);
       
    91 	CleanupStack::PopAndDestroy(step025_01);
       
    92 
       
    93 	return iTestStepResult;
       
    94 	}
       
    95