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 // INCLUDE FILES |
|
18 #include <Stiftestinterface.h> |
|
19 #include <MenuSatInterface.h> |
|
20 #include "menusatinterfacetest.h" |
|
21 |
|
22 //MCS |
|
23 #include <mcsdef.h> |
|
24 |
|
25 // CONSTANTS |
|
26 _LIT( KSatName, "Plus Mega" ); |
|
27 |
|
28 // ============================ MEMBER FUNCTIONS =============================== |
|
29 |
|
30 |
|
31 TInt CMenuSatInterfaceTest::Test_SatUiVisibleL(CStifItemParser& ) |
|
32 { |
|
33 TInt result (KErrGeneral); |
|
34 |
|
35 TBool visible = ETrue; |
|
36 CMenuSATInterface* interface = new(ELeave) CMenuSATInterface(); |
|
37 CleanupStack::PushL( interface ); |
|
38 interface->MakeSatUiVisible( visible, KSatName ); |
|
39 CleanupStack::PopAndDestroy( interface ); |
|
40 |
|
41 TBuf<256> name; |
|
42 TInt error = RProperty::Get( KCRUidMenu, KMenuSatUIName, name ); |
|
43 |
|
44 if( name == KSatName() |
|
45 && error == KErrNone ) |
|
46 { |
|
47 result = KErrNone; |
|
48 } |
|
49 return result; |
|
50 } |
|
51 |
|
52 // --------------------------------------------------------------------------- |
|
53 // |
|
54 // --------------------------------------------------------------------------- |
|
55 // |
|
56 TInt CMenuSatInterfaceTest::Test_SatUiVisibleIconIdL(CStifItemParser& ) |
|
57 { |
|
58 TInt result (KErrGeneral); |
|
59 |
|
60 TBool visible = ETrue; |
|
61 TUint8 iconInfoId = 21; |
|
62 CMenuSATInterface* interface = new(ELeave) CMenuSATInterface(); |
|
63 CleanupStack::PushL( interface ); |
|
64 interface->MakeSatUiVisible( visible, KSatName, iconInfoId ); |
|
65 CleanupStack::PopAndDestroy( interface ); |
|
66 |
|
67 TInt iconInfoIdTest = -1; |
|
68 RProperty::Get( KCRUidMenu, KMenuSatUIIconId, iconInfoIdTest ); |
|
69 |
|
70 if( iconInfoIdTest == iconInfoId ) |
|
71 { |
|
72 result = KErrNone; |
|
73 } |
|
74 return result; |
|
75 } |
|
76 |
|
77 // --------------------------------------------------------------------------- |
|
78 // |
|
79 // --------------------------------------------------------------------------- |
|
80 // |
|
81 TInt CMenuSatInterfaceTest::Test_SatInterfaceConstructL(CStifItemParser& ) |
|
82 { |
|
83 TInt result (KErrGeneral); |
|
84 |
|
85 CMenuSATInterface* interface = new(ELeave) CMenuSATInterface(); |
|
86 if( interface ) |
|
87 { |
|
88 result = KErrNone; |
|
89 } |
|
90 return result; |
|
91 } |
|
92 |
|
93 |
|
94 // End of File |
|