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