|
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 // mectest011step.cpp |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 */ |
|
21 |
|
22 #include "mectest011step.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 CMecTest011Step::~CMecTest011Step() |
|
31 { |
|
32 } |
|
33 |
|
34 |
|
35 /** |
|
36 //! @SYMTestCaseID MEC_UNIT_TEST_011 |
|
37 //! @SYMTestCaseDesc Simple API Test, RMetaExtensionContainerC::FindExtension() after opening |
|
38 // against a container with extensions |
|
39 //! @SYMFssID COMMS-INFRAS/Esock/MetaExtensionContainer/UnitTest |
|
40 //! @SYMTestActions 1) Open container |
|
41 // 2) AppendExtension T1 |
|
42 // 3) Open constMec container against container |
|
43 // 4) RMetaExtensionContainer::FindExtension T1 == T1 |
|
44 // 5) Close |
|
45 //! @SYMTestExpectedResults KErrNone. |
|
46 */ |
|
47 TVerdict CMecTest011Step::RunTestStepL() |
|
48 { |
|
49 TVerdict result = EFail; |
|
50 |
|
51 RMetaExtensionContainer mec; |
|
52 mec.Open(); |
|
53 CleanupClosePushL(mec); |
|
54 |
|
55 CreateAndAppendExtensionL(mec, TTestExtension1::ETypeId); |
|
56 |
|
57 RMetaExtensionContainerC constMec; |
|
58 constMec.Open(mec); |
|
59 CleanupStack::PopAndDestroy(&mec); |
|
60 |
|
61 const TTestExtension1* ext1 = static_cast<const TTestExtension1*>(constMec.FindExtension(TTestExtension1::TypeId())); |
|
62 if (ext1 && ext1->GetTypeId() == TTestExtension1::TypeId()) |
|
63 { |
|
64 result = EPass; |
|
65 } |
|
66 |
|
67 constMec.Close(); |
|
68 return result; |
|
69 } |
|
70 |