|
1 /* |
|
2 * Copyright (c) 2007 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: Implementation of the T_MProfileExtraSettings test class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 //////////////////////////////////////////////////////////////////////// |
|
20 // T_MProfileExtraSettings.cpp |
|
21 // |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32math.h> |
|
25 #include <e32svr.h> |
|
26 |
|
27 #include <EUnitMacros.h> |
|
28 #include <TEUnitAssertionInfo.h> |
|
29 |
|
30 #include <BAMDESCA.H> |
|
31 #include <MProfileEngine.h> |
|
32 #include <MProfile.h> |
|
33 #include <MProfileExtraSettings.h> |
|
34 #include <MProfilePttSettings.h> |
|
35 #include <MProfileFeedbackSettings.h> |
|
36 #include <MProfile3DToneSettings.h> |
|
37 //#include "T_ProfileTestTools.h" |
|
38 |
|
39 // the header for the tested class |
|
40 #include "T_MProfileExtraSettings.h" |
|
41 |
|
42 |
|
43 // create the testing class |
|
44 T_MProfileExtraSettings* T_MProfileExtraSettings::NewLC() |
|
45 { |
|
46 T_MProfileExtraSettings* self = new(ELeave) T_MProfileExtraSettings; |
|
47 |
|
48 CleanupStack::PushL( self ); |
|
49 // need to generate the table, so call base classes |
|
50 // second phase constructor |
|
51 self->ConstructL(); |
|
52 return self; |
|
53 } |
|
54 |
|
55 void T_MProfileExtraSettings::ConstructL() |
|
56 { |
|
57 CEUnitTestSuiteClass::ConstructL(); |
|
58 |
|
59 } |
|
60 |
|
61 T_MProfileExtraSettings::~T_MProfileExtraSettings() |
|
62 { |
|
63 if( iProfile ) |
|
64 { |
|
65 iProfile->Release(); |
|
66 } |
|
67 if( iProfileEngine ) |
|
68 { |
|
69 iProfileEngine->Release(); |
|
70 } |
|
71 } |
|
72 |
|
73 /** |
|
74 * Assistance methods |
|
75 */ |
|
76 |
|
77 |
|
78 /** |
|
79 * Setup |
|
80 */ |
|
81 void T_MProfileExtraSettings::EmptySetupL() |
|
82 { |
|
83 } |
|
84 |
|
85 |
|
86 |
|
87 void T_MProfileExtraSettings::SetupL() |
|
88 { |
|
89 iProfileEngine = CreateProfileEngineL(); |
|
90 iProfile = iProfileEngine->ActiveProfileL(); |
|
91 } |
|
92 |
|
93 |
|
94 /** |
|
95 * Teardown |
|
96 */ |
|
97 void T_MProfileExtraSettings::EmptyTeardown() |
|
98 { |
|
99 |
|
100 } |
|
101 |
|
102 void T_MProfileExtraSettings::Teardown() |
|
103 { |
|
104 if( iProfile ) |
|
105 { |
|
106 iProfile->Release(); |
|
107 iProfile = NULL; |
|
108 } |
|
109 if( iProfileEngine ) |
|
110 { |
|
111 iProfileEngine->Release(); |
|
112 iProfileEngine = NULL; |
|
113 } |
|
114 } |
|
115 |
|
116 /** |
|
117 * Tests |
|
118 */ |
|
119 void T_MProfileExtraSettings::EmptyTestL() |
|
120 { |
|
121 //EUNIT_ASSERT( ETrue ); |
|
122 } |
|
123 |
|
124 ///////////////////// |
|
125 // MProfile |
|
126 void T_MProfileExtraSettings::ProfilePttSettingsTestL() |
|
127 { |
|
128 const MProfileExtraSettings& extraSettings = iProfile->ProfileExtraSettings(); |
|
129 const MProfilePttSettings& pttSettings = extraSettings.ProfilePttSettings(); |
|
130 } |
|
131 |
|
132 void T_MProfileExtraSettings::ProfileFeedbackSettingsTestL() |
|
133 { |
|
134 const MProfileExtraSettings& extraSettings = iProfile->ProfileExtraSettings(); |
|
135 const MProfileFeedbackSettings& feedbackSettings = extraSettings.ProfileFeedbackSettings(); |
|
136 } |
|
137 |
|
138 void T_MProfileExtraSettings::Profile3DToneSettingsTestL() |
|
139 { |
|
140 const MProfileExtraSettings& extraSettings = iProfile->ProfileExtraSettings(); |
|
141 const MProfile3DToneSettings& threeDSettings = extraSettings.Profile3DToneSettings(); |
|
142 } |
|
143 |
|
144 |
|
145 // Test case table for this test suite class |
|
146 EUNIT_BEGIN_TEST_TABLE( T_MProfileExtraSettings, "T_MProfileExtended test suite", "MODULE" ) |
|
147 |
|
148 EUNIT_TESTCASE("Get PTT interface test ", SetupL, ProfilePttSettingsTestL, Teardown ) |
|
149 EUNIT_TESTCASE("Get Feedback interface test ", SetupL, ProfileFeedbackSettingsTestL, Teardown ) |
|
150 EUNIT_TESTCASE("Get 3D-Tone interface test ", SetupL, Profile3DToneSettingsTestL, Teardown ) |
|
151 |
|
152 EUNIT_END_TESTCASE_TABLE |
|
153 |
|
154 // End of File |