datacommsserver/esockserver/test/te_mecunittest/src/mectest009step.cpp
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     1 // Copyright (c) 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 //
       
    15 // mectest009step.cpp
       
    16 //
       
    17 
       
    18 /**
       
    19 @file
       
    20 */
       
    21 
       
    22 #include "mectest009step.h"
       
    23 #include "testextensions.h"
       
    24 #include "metaextensioncontainerspy.h"
       
    25 #include <comms-infras/ss_rmetaextensioncontainer.h>
       
    26 #include <comms-infras/ss_commsprov.h>
       
    27 
       
    28 using namespace ESock;
       
    29 
       
    30 CMecTest009Step::~CMecTest009Step()
       
    31     {
       
    32     }
       
    33 
       
    34 
       
    35 /**
       
    36 //! @SYMTestCaseID      MEC_UNIT_TEST_009
       
    37 //! @SYMTestCaseDesc 	Simple API Test, RMetaExtensionContainer::FindExtension() where extension is last in the list
       
    38 //! @SYMFssID 			COMMS-INFRAS/Esock/MetaExtensionContainer/UnitTest
       
    39 //! @SYMTestActions 	1) Open container
       
    40 //						2) AppendExtension T1 to container
       
    41 //						3) AppendExtension T2 to container
       
    42 //						4) FindExtensionL T2 == T2
       
    43 //						5) Close container
       
    44 //! @SYMTestExpectedResults  KErrNone.
       
    45 */
       
    46 TVerdict CMecTest009Step::RunTestStepL()
       
    47     {
       
    48     TVerdict result = EFail;
       
    49     
       
    50     RMetaExtensionContainer mec;
       
    51     mec.Open();
       
    52     CleanupClosePushL(mec);
       
    53     
       
    54     CreateAndAppendExtensionL(mec, TTestExtension1::ETypeId);
       
    55     CreateAndAppendExtensionL(mec, TTestExtension2::ETypeId);
       
    56     
       
    57     const Meta::SMetaData* ext = mec.FindExtension(TTestExtension2::TypeId());
       
    58     if (ext != NULL && ext->GetTypeId() == TTestExtension2::TypeId())
       
    59     	{
       
    60     	result = EPass;
       
    61     	}
       
    62     
       
    63     CleanupStack::PopAndDestroy(&mec);
       
    64     
       
    65     return result;
       
    66     }
       
    67