|
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 // mectest005step.cpp |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 */ |
|
21 |
|
22 #include "mectest005step.h" |
|
23 #include "testextensions.h" |
|
24 #include <comms-infras/ss_rmetaextensioncontainer.h> |
|
25 #include <comms-infras/ss_commsprov.h> |
|
26 |
|
27 using namespace ESock; |
|
28 |
|
29 CMecTest005Step::~CMecTest005Step() |
|
30 { |
|
31 } |
|
32 |
|
33 |
|
34 /** |
|
35 //! @SYMTestCaseID MEC_UNIT_TEST_005 |
|
36 //! @SYMTestCaseDesc Simple API Test, RMetaExtensionContainer::FindExtension() |
|
37 //! @SYMFssID COMMS-INFRAS/Esock/MetaExtensionContainer/UnitTest |
|
38 //! @SYMTestActions 1) Open container |
|
39 // 2) AppendExtension T1 to container |
|
40 // 3) FindExtension T1 == T1 |
|
41 // 4) Close container |
|
42 //! @SYMTestExpectedResults KErrNone. |
|
43 */ |
|
44 TVerdict CMecTest005Step::RunTestStepL() |
|
45 { |
|
46 TVerdict result = EFail; |
|
47 |
|
48 RMetaExtensionContainer mec; |
|
49 mec.Open(); |
|
50 CleanupClosePushL(mec); |
|
51 |
|
52 CreateAndAppendExtensionL(mec, TTestExtension1::ETypeId); |
|
53 |
|
54 const Meta::SMetaData* ext = mec.FindExtension(TTestExtension1::TypeId()); |
|
55 if (ext != NULL && ext->GetTypeId() == TTestExtension1::TypeId()) |
|
56 { |
|
57 result = EPass; |
|
58 } |
|
59 |
|
60 CleanupStack::PopAndDestroy(&mec); |
|
61 |
|
62 return result; |
|
63 } |
|
64 |