sysstatemgmt/systemstateplugins/test/tunitadptplugin/src/temergencycallrf_adaptationplugin_step.cpp
equal
deleted
inserted
replaced
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2007-2010 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> |
25 #include "temergencycallrf_adaptationplugin_step.h" |
26 #include "temergencycallrf_adaptationplugin_step.h" |
|
27 |
|
28 const TUint32 KEmergencyCallRfAdaptationPluginPropertyKey = 0x2000E657; |
|
29 const TUid KPropertyCategory={0x2000D75B}; |
26 |
30 |
27 // |
31 // |
28 // Run the tests |
32 // Run the tests |
29 // |
33 // |
30 |
34 |
71 |
75 |
72 |
76 |
73 //from CAdaptationTestBase |
77 //from CAdaptationTestBase |
74 TVerdict CTestEmergencyCallRfAdaptationPlugin::doTestStepL() |
78 TVerdict CTestEmergencyCallRfAdaptationPlugin::doTestStepL() |
75 { |
79 { |
76 TInt err = KErrNone; |
|
77 |
|
78 __UHEAP_MARK; |
80 __UHEAP_MARK; |
|
81 |
|
82 TInt err = RProperty::Define(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey, RProperty::EInt); |
|
83 TEST((KErrNone == err) || (KErrAlreadyExists == err)); |
|
84 err = RProperty::Set(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey, 1); |
|
85 TEST(KErrNone == err); |
79 |
86 |
80 TRAP(err, TestActivateRfForEmergencyCall()); |
87 TRAP(err, TestActivateRfForEmergencyCall()); |
81 TEST(iStatus.Int() == KErrDisconnected); |
88 TEST(iStatus.Int() == KErrDisconnected); |
82 TEST(err == KErrNone); |
89 TEST(err == KErrNone); |
83 TRAP(err, TestDeactivateRfForEmergencyCall()); |
90 TRAP(err, TestDeactivateRfForEmergencyCall()); |
95 TEST(err == KErrNone); |
102 TEST(err == KErrNone); |
96 TEST(iStatus.Int() == KErrNone); |
103 TEST(iStatus.Int() == KErrNone); |
97 TestCancel(); |
104 TestCancel(); |
98 //TestRelease(); // have to test this part too ... |
105 //TestRelease(); // have to test this part too ... |
99 |
106 |
|
107 err = RProperty::Delete(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey); |
|
108 TEST(KErrNone == err); |
100 __UHEAP_MARKEND; |
109 __UHEAP_MARKEND; |
101 |
110 |
102 return TestStepResult(); |
111 return TestStepResult(); |
103 } |
112 } |