sysstatemgmt/systemstateplugins/test/tunitadptplugin/src/tsim_adaptationplugin_step.cpp
equal
deleted
inserted
replaced
1 // Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
20 */ |
20 */ |
21 |
21 |
22 |
22 |
23 |
23 |
24 #include <s32mem.h> |
24 #include <s32mem.h> |
25 #include <e32property.h> |
|
26 #include "tsim_adaptationplugin_step.h" |
25 #include "tsim_adaptationplugin_step.h" |
27 |
26 |
28 // |
27 // |
29 // Run the tests |
28 // Run the tests |
30 // |
29 // |
31 const TUint32 KSimPluginPropertyKey = 0x2000D76B; |
30 |
32 const TUid KPropertyCategory={0x2000D75B}; // tcustomcmd_server SID = KSsmServerName SID (changed in tcustomcmd_server.mmp file) |
|
33 |
31 |
34 CTestSimAdaptationPlugin::CTestSimAdaptationPlugin() |
32 CTestSimAdaptationPlugin::CTestSimAdaptationPlugin() |
35 :CAdaptationTestBase(KTCTestSimAdaptationPlugin) |
33 :CAdaptationTestBase(KTCTestSimAdaptationPlugin) |
36 { |
34 { |
37 |
35 |
102 |
100 |
103 |
101 |
104 //from CAdaptationTestBase |
102 //from CAdaptationTestBase |
105 TVerdict CTestSimAdaptationPlugin::doTestStepL() |
103 TVerdict CTestSimAdaptationPlugin::doTestStepL() |
106 { |
104 { |
|
105 TInt err = KErrNone; |
|
106 |
107 __UHEAP_MARK; |
107 __UHEAP_MARK; |
108 |
|
109 TInt err = RProperty::Define(KPropertyCategory, KSimPluginPropertyKey, RProperty::EInt); |
|
110 TEST((KErrNone == err) || (KErrAlreadyExists == err)); |
|
111 err = RProperty::Set(KPropertyCategory, KSimPluginPropertyKey, 1); |
|
112 TEST(KErrNone == err); |
|
113 |
108 |
114 TRAP(err, TestGetSimOwned()); |
109 TRAP(err, TestGetSimOwned()); |
115 TEST(err == KErrNone); |
110 TEST(err == KErrNone); |
116 |
111 |
117 TRAP(err, TestNotifySimEvent()); |
112 TRAP(err, TestNotifySimEvent()); |
131 |
126 |
132 TestNotifyCancel(); |
127 TestNotifyCancel(); |
133 TestGetCancel(); |
128 TestGetCancel(); |
134 //TestRelease(); // have to test this part too ... |
129 //TestRelease(); // have to test this part too ... |
135 |
130 |
136 err = RProperty::Delete(KPropertyCategory, KSimPluginPropertyKey); |
|
137 TEST(KErrNone == err); |
|
138 __UHEAP_MARKEND; |
131 __UHEAP_MARKEND; |
139 |
132 |
140 return TestStepResult(); |
133 return TestStepResult(); |
141 } |
134 } |