|
1 /* |
|
2 * Copyright (c) 2002 - 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: HarvesterCollectionMediatorTest.h |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef HARVESTERCOLLECTIONMEDIATORTEST_H |
|
21 #define HARVESTERCOLLECTIONMEDIATORTEST_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <StifLogger.h> |
|
25 #include <TestScripterInternal.h> |
|
26 #include <StifTestModule.h> |
|
27 #include <TestclassAssert.h> |
|
28 |
|
29 #include "mpxcollectionmediator.h" |
|
30 #include <mpxcollectionutility.h> |
|
31 #include <mpxmoveobserver.h> |
|
32 |
|
33 // CONSTANTS |
|
34 //const ?type ?constant_var = ?constant; |
|
35 // MACROS |
|
36 //#define ?macro ?macro_def |
|
37 #define TEST_CLASS_VERSION_MAJOR 0 |
|
38 #define TEST_CLASS_VERSION_MINOR 0 |
|
39 #define TEST_CLASS_VERSION_BUILD 0 |
|
40 |
|
41 // Logging path |
|
42 _LIT( KHarvesterCollectionMediatorTestLogPath, "\\logs\\testframework\\HarvesterCollectionMediatorTest\\" ); |
|
43 // Log file |
|
44 _LIT( KHarvesterCollectionMediatorTestLogFile, "HarvesterCollectionMediatorTest.txt" ); |
|
45 _LIT( KHarvesterCollectionMediatorTestLogFileWithTitle, "HarvesterCollectionMediatorTest_[%S].txt" ); |
|
46 _LIT( KTestItemPath, "\\testing\\data\\test0000.mp3"); |
|
47 _LIT( KTestItemPath2, "\\testing\\data\\test0001.mp3"); |
|
48 _LIT( KTestItemPath3, "\\testing\\data\\test0002.mp3"); |
|
49 // FUNCTION PROTOTYPES |
|
50 //?type ?function_name(?arg_list); |
|
51 |
|
52 // FORWARD DECLARATIONS |
|
53 //class ?FORWARD_CLASSNAME; |
|
54 class CHarvesterCollectionMediatorTest; |
|
55 class CMPXCollectionMediator; |
|
56 |
|
57 // DATA TYPES |
|
58 //enum ?declaration |
|
59 //typedef ?declaration |
|
60 //extern ?data_type; |
|
61 |
|
62 // CLASS DECLARATION |
|
63 |
|
64 /** |
|
65 * CHarvesterCollectionMediatorTest test class for STIF Test Framework TestScripter. |
|
66 * ?other_description_lines |
|
67 * |
|
68 * @lib ?library |
|
69 * @since ?Series60_version |
|
70 */ |
|
71 NONSHARABLE_CLASS(CHarvesterCollectionMediatorTest) : public CScriptBase, |
|
72 public MMPXMoveItemObserver |
|
73 |
|
74 |
|
75 |
|
76 { |
|
77 public: // Constructors and destructor |
|
78 |
|
79 /** |
|
80 * Two-phased constructor. |
|
81 */ |
|
82 static CHarvesterCollectionMediatorTest* NewL( CTestModuleIf& aTestModuleIf ); |
|
83 |
|
84 /** |
|
85 * Destructor. |
|
86 */ |
|
87 virtual ~CHarvesterCollectionMediatorTest(); |
|
88 |
|
89 public: // New functions |
|
90 |
|
91 /** |
|
92 * ?member_description. |
|
93 * @since ?Series60_version |
|
94 * @param ?arg1 ?description |
|
95 * @return ?description |
|
96 */ |
|
97 //?type ?member_function( ?type ?arg1 ); |
|
98 |
|
99 public: // Functions from base classes |
|
100 |
|
101 /** |
|
102 * From CScriptBase Runs a script line. |
|
103 * @since ?Series60_version |
|
104 * @param aItem Script line containing method name and parameters |
|
105 * @return Symbian OS error code |
|
106 */ |
|
107 virtual TInt RunMethodL( CStifItemParser& aItem ); |
|
108 |
|
109 //from MMPXMoveItemObserver |
|
110 virtual void HandleMoveCompleteL( TInt aErr ); |
|
111 |
|
112 protected: // New functions |
|
113 |
|
114 /** |
|
115 * ?member_description. |
|
116 * @since ?Series60_version |
|
117 * @param ?arg1 ?description |
|
118 * @return ?description |
|
119 */ |
|
120 //?type ?member_function( ?type ?arg1 ); |
|
121 |
|
122 protected: // Functions from base classes |
|
123 |
|
124 /** |
|
125 * From ?base_class ?member_description |
|
126 */ |
|
127 //?type ?member_function(); |
|
128 |
|
129 private: |
|
130 |
|
131 /** |
|
132 * C++ default constructor. |
|
133 */ |
|
134 CHarvesterCollectionMediatorTest( CTestModuleIf& aTestModuleIf ); |
|
135 |
|
136 /** |
|
137 * By default Symbian 2nd phase constructor is private. |
|
138 */ |
|
139 void ConstructL(); |
|
140 |
|
141 // Prohibit copy constructor if not deriving from CBase. |
|
142 // ?classname( const ?classname& ); |
|
143 // Prohibit assigment operator if not deriving from CBase. |
|
144 // ?classname& operator=( const ?classname& ); |
|
145 |
|
146 /** |
|
147 * Frees all resources allocated from test methods. |
|
148 * @since ?Series60_version |
|
149 */ |
|
150 void Delete(); |
|
151 |
|
152 |
|
153 /** |
|
154 * Test methods are listed below. |
|
155 */ |
|
156 /** |
|
157 * Example test method. |
|
158 * @since ?Series60_version |
|
159 * @param aItem Script line containing parameters. |
|
160 * @return Symbian OS error code. |
|
161 */ |
|
162 virtual TInt ExampleL( CStifItemParser& aItem ); |
|
163 |
|
164 |
|
165 |
|
166 //to test CMPXCollectionMediator::NewL( ) |
|
167 virtual TInt CMPXCollectionMediatorNewL( CStifItemParser& /*aItem*/ ); //--debug pass |
|
168 //to test CMPXCollectionMediator::NewL( MMPXCollection& aColUtil, MMPXMediatorObserver* aObs = NULL ) |
|
169 virtual TInt CMPXCollectionMediatorNewLWithMPXCollection( CStifItemParser& /*aItem*/ ); //--debug pass |
|
170 //to test CMPXCollectionMediator::~CMPXCollectionMediator() |
|
171 virtual TInt CMPXCollectionMediatorDestruction( CStifItemParser& /*aItem*/ ); //--debug pass |
|
172 //to test CMPXCollectionMediator::AddItemL( CMPXMedia*& aMediaProp) |
|
173 virtual TInt CMPXCollectionMediatorAddItemLMedia( CStifItemParser& /*aItem*/ ); //--debug pass |
|
174 //to test CMPXCollectionMediator::NewLC(); |
|
175 virtual TInt CMPXCollectionMediatorNewLC( CStifItemParser& /*aItem*/ ); //--debug pass |
|
176 //to test CMPXCollectionMediator::AddItemL( CMPXMediaArray& aMPArray ); |
|
177 virtual TInt CMPXCollectionAddItemLCMPXMediaArray( CStifItemParser& /*aItem*/ ); //--debug pass |
|
178 //to test CMPXCollectionMediator::SetItemL( CMPXMedia*& aMediaProp ) |
|
179 virtual TInt CMPXCollectionSetItemLByCMPXMedia( CStifItemParser& /*aItem*/ ); //--debug pass |
|
180 //to test CMPXCollectionMediator::SetItemL( CMPXMediaArray& aMPArray ); |
|
181 virtual TInt CMPXCollectionSetItemLByCMPXMediaArray( CStifItemParser& /*aItem*/ ); //--debug pass |
|
182 //to test CMPXCollectionMediator::SetItemL(TArray<CMPXMedia*>& aArray,CMPXCollectionPath& aPath,RArray<TInt>& aIndices ); |
|
183 virtual TInt CMPXCollectionSetItemL( CStifItemParser& /*aItem*/ ); //--debug crash |
|
184 //to test CMPXCollectionMediator::CheckItemL( CMPXMedia& aMedia ) |
|
185 virtual TInt CMPXCollectionCheckItemL( CStifItemParser& /*aItem*/ ); //--debug pass |
|
186 |
|
187 //to test CMPXCollectionMediator::MoveItemL( CMPXMedia*& aMedia,TUid aOldCollectionId,TUid aNewCollectionId ) |
|
188 virtual TInt CMPXCollectionMoveItemLwith3paras( CStifItemParser& /*aItem*/ ); //--debug fail |
|
189 |
|
190 //to test CMPXCollectionMediator::MoveItemL( CMPXMedia*& aMedia,TUid aOldCollectionId, |
|
191 // TUid aNewCollectionId,MMPXMoveItemObserver* aObs ) |
|
192 virtual TInt CMPXCollectionMoveItemLwith4paras( CStifItemParser& /*aItem*/ ); //--debug pass |
|
193 |
|
194 virtual TInt CMPXCollectionMediatorWithRealCollection( CStifItemParser& /*aItem*/ ); //--debug pass |
|
195 |
|
196 /** |
|
197 * Method used to log version of test class |
|
198 */ |
|
199 void SendTestClassVersion(); |
|
200 |
|
201 //ADD NEW METHOD DEC HERE |
|
202 //[TestMethods] - Do not remove |
|
203 |
|
204 public: // Data |
|
205 // ?one_line_short_description_of_data |
|
206 //?data_declaration; |
|
207 |
|
208 CMPXCollectionMediator* iMediator; |
|
209 |
|
210 |
|
211 private: // Friend classes |
|
212 //?friend_class_declaration; |
|
213 CMPXCollectionPath* iCollectionPath; |
|
214 MMPXCollectionUtility* iCollectionUtility; |
|
215 |
|
216 }; |
|
217 |
|
218 #endif // HARVESTERCOLLECTIONMEDIATORTEST_H |
|
219 |
|
220 // End of File |