1 /* |
|
2 * Copyright (c) 2008 - 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 the License "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: For Stif fw related functions. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 #ifndef TELEPATHYGABBLETEST_H |
|
23 #define TELEPATHYGABBLETEST_H |
|
24 |
|
25 // INCLUDES |
|
26 #include <StifLogger.h> |
|
27 #include <TestScripterInternal.h> |
|
28 #include <StifTestModule.h> |
|
29 #include <glib.h> |
|
30 |
|
31 |
|
32 |
|
33 // Logging path |
|
34 _LIT( KTelepathyGabbleTestLogPath, "\\logs\\testframework\\TelepathyGabbleTest\\" ); |
|
35 // Log file |
|
36 _LIT( KTelepathyGabbleTestLogFile, "TelepathyGabbleTest.txt" ); |
|
37 _LIT( KTelepathyGabbleTestLogFileWithTitle, "TelepathyGabbleTest_[%S].txt" ); |
|
38 |
|
39 // FUNCTION PROTOTYPES |
|
40 //?type ?function_name(?arg_list); |
|
41 |
|
42 // FORWARD DECLARATIONS |
|
43 class CTelepathyGabbleTest; |
|
44 |
|
45 class CTelepathyGabbleLoginTest; |
|
46 class CTelepathyGabbleSendRecvMessage; |
|
47 class CTelepathyGabbleAddDeleteContact; |
|
48 class CTelepathyGabbleFetchContacts; |
|
49 class CTelepathyGabbleSearch; |
|
50 class CTestData; |
|
51 |
|
52 |
|
53 // CLASS DECLARATION |
|
54 |
|
55 /** |
|
56 * CTelepathyGabbleTest test class for STIF Test Framework TestScripter. |
|
57 * ?other_description_lines |
|
58 * |
|
59 * @lib ?library |
|
60 * @since ?Series60_version |
|
61 */ |
|
62 NONSHARABLE_CLASS(CTelepathyGabbleTest) : public CScriptBase |
|
63 { |
|
64 public: // Constructors and destructor |
|
65 |
|
66 /** |
|
67 * Two-phased constructor. |
|
68 */ |
|
69 static CTelepathyGabbleTest* NewL( CTestModuleIf& aTestModuleIf ); |
|
70 |
|
71 /** |
|
72 * Destructor. |
|
73 */ |
|
74 virtual ~CTelepathyGabbleTest(); |
|
75 |
|
76 public: // New functions |
|
77 |
|
78 /** |
|
79 * ?member_description. |
|
80 * @since ?Series60_version |
|
81 * @param ?arg1 ?description |
|
82 * @return ?description |
|
83 */ |
|
84 |
|
85 public: // Functions from base classes |
|
86 |
|
87 /** |
|
88 * From CScriptBase Runs a script line. |
|
89 * @since ?Series60_version |
|
90 * @param aItem Script line containing method name and parameters |
|
91 * @return Symbian OS error code |
|
92 */ |
|
93 virtual TInt RunMethodL( CStifItemParser& aItem ); |
|
94 |
|
95 protected: // New functions |
|
96 |
|
97 /** |
|
98 * ?member_description. |
|
99 * @since ?Series60_version |
|
100 * @param ?arg1 ?description |
|
101 * @return ?description |
|
102 */ |
|
103 //?type ?member_function( ?type ?arg1 ); |
|
104 |
|
105 protected: // Functions from base classes |
|
106 |
|
107 |
|
108 private: |
|
109 |
|
110 /** |
|
111 * C++ default constructor. |
|
112 */ |
|
113 CTelepathyGabbleTest( CTestModuleIf& aTestModuleIf ); |
|
114 |
|
115 /** |
|
116 * By default Symbian 2nd phase constructor is private. |
|
117 */ |
|
118 void ConstructL(); |
|
119 |
|
120 // Prohibit copy constructor if not deriving from CBase. |
|
121 // ?classname( const ?classname& ); |
|
122 // Prohibit assigment operator if not deriving from CBase. |
|
123 // ?classname& operator=( const ?classname& ); |
|
124 |
|
125 /** |
|
126 * Frees all resources allocated from test methods. |
|
127 * @since ?Series60_version |
|
128 */ |
|
129 void Delete(); |
|
130 |
|
131 /** |
|
132 * Test methods are listed below. |
|
133 */ |
|
134 |
|
135 /** |
|
136 * Example test method. |
|
137 * @since ?Series60_version |
|
138 * @param aItem Script line containing parameters. |
|
139 * @return Symbian OS error code. |
|
140 */ |
|
141 //virtual TInt ExampleL( CStifItemParser& aItem ); |
|
142 //ADD NEW METHOD DEC HERE |
|
143 //[TestMethods] - Do not remove |
|
144 |
|
145 |
|
146 //Login |
|
147 virtual TInt LoginTestL( CStifItemParser& aItem ); |
|
148 |
|
149 //Logout |
|
150 virtual TInt LogoutTestL(CStifItemParser& aItem ); |
|
151 |
|
152 //Login related other test cases |
|
153 |
|
154 virtual TInt LoginInvalidUseridTestL( CStifItemParser& aItem ); |
|
155 virtual TInt LoginInvalidPasswdTestL( CStifItemParser& aItem ); |
|
156 virtual TInt LoginInvalidUseridPasswdTestL( CStifItemParser& aItem ); |
|
157 virtual TInt LoginblankUseridTestL( CStifItemParser& aItem ) ; |
|
158 virtual TInt LoginblankPasswdTestL( CStifItemParser& aItem ); |
|
159 virtual TInt LoginblankUseridblankPasswdTestL( CStifItemParser& aItem ); |
|
160 virtual TInt LoginCancelTestL( CStifItemParser& aItem ); |
|
161 |
|
162 |
|
163 |
|
164 //Send Message |
|
165 virtual TInt SendMessageTestL(CStifItemParser& aItem ); |
|
166 virtual TInt SendMessageWith400TestL(CStifItemParser& aItem ); |
|
167 virtual TInt SendMesasgeBlankTestL( CStifItemParser& aItem ); |
|
168 virtual TInt SendMesasgeToBlankUserIdTestL( CStifItemParser& aItem ); |
|
169 virtual TInt SendMessageRepeatedTestL( CStifItemParser& aItem ); |
|
170 virtual TInt SendMessagetoinvalidUseridTestL( CStifItemParser& aItem ); |
|
171 |
|
172 |
|
173 //Receive Message |
|
174 virtual TInt ReceiveMessageTestL(CStifItemParser& aItem); |
|
175 virtual TInt ReceiveMessageMaxLengthTestL(CStifItemParser& aItem); |
|
176 virtual TInt ReceiveMessageBlankTestL(CStifItemParser& aItem); |
|
177 virtual TInt ReceiveRepeatedMessageTestL(CStifItemParser& aItem); |
|
178 |
|
179 |
|
180 //Add Contact related test cases |
|
181 virtual TInt AddContactTestL(CStifItemParser& aItem); |
|
182 virtual TInt AddContactWithBlankUserIdTestL(CStifItemParser& aItem); |
|
183 virtual TInt AddContactAlreadyInRosterTestL(CStifItemParser& aItem); |
|
184 |
|
185 //Remove Contact related test cases |
|
186 virtual TInt RemoveContactTestL(CStifItemParser& aItem ); |
|
187 virtual TInt RemoveInvalidContactTestL( CStifItemParser& aItem ); |
|
188 virtual TInt RemoveContactAlreadyRemovedTestL( CStifItemParser& aItem ); |
|
189 virtual TInt RemoveContactWithBlankUserIdTestL( CStifItemParser& aItem ); |
|
190 |
|
191 //Fetch Contact related test cases |
|
192 virtual TInt FetchContactsTestL(CStifItemParser& aItem ); |
|
193 |
|
194 //Search related test cases |
|
195 virtual TInt SearchTestL(CStifItemParser& aItem ); |
|
196 virtual TInt GetSearchKeysTestL(CStifItemParser& aItem ); |
|
197 virtual TInt SearchWithAllKeysTestL( CStifItemParser& aItem ); |
|
198 |
|
199 virtual TInt SearchTwoInvalidKeysTestL( CStifItemParser& aItem ); |
|
200 virtual TInt SearchInvalidKeyTestL(CStifItemParser& aItem ); |
|
201 virtual TInt SearchNoKeyValueTestL(CStifItemParser& aItem ); |
|
202 virtual TInt SearchBlankStringTestL(CStifItemParser& aItem ); |
|
203 virtual TInt SearchAfterGetSearchKeysL( CStifItemParser& aItem ); |
|
204 virtual TInt SearchTwiceTestL( CStifItemParser& aItem ); |
|
205 virtual TInt SearchFiveTimesTestL( CStifItemParser& aItem ); |
|
206 virtual TInt SearchTwiceWithDiffStringsTestL( CStifItemParser& aItem ); |
|
207 |
|
208 |
|
209 gchar* GetSearchLabelForGizmoL(gchar* search_key); |
|
210 gchar* GetSearchLabelForYukonL(gchar* search_key); |
|
211 gchar* GetSearchLabelL(gchar* aService,gchar* aSearchKey); |
|
212 /*static gboolean search_hash_remove( gpointer key, gpointer value, |
|
213 gpointer user_data );*/ |
|
214 |
|
215 |
|
216 private: //Some data members |
|
217 |
|
218 //Login class object |
|
219 CTelepathyGabbleLoginTest *iLoginObj; |
|
220 //Send Message class object |
|
221 CTelepathyGabbleSendRecvMessage *iSendMsgObj; |
|
222 |
|
223 //used for adding/deleting contact |
|
224 CTelepathyGabbleAddDeleteContact *iAddDelContactObj; |
|
225 |
|
226 //used for fetching contacts |
|
227 CTelepathyGabbleFetchContacts *iFetchContactObj; |
|
228 |
|
229 //used for searching contacts |
|
230 CTelepathyGabbleSearch *iSearchObj; |
|
231 CTestData* iTestData; |
|
232 |
|
233 }; |
|
234 |
|
235 #endif // TELEPATHYGABBLETEST_H |
|
236 |
|
237 // End of File |
|
238 |
|