|
1 [Define] |
|
2 |
|
3 LISTID myList@nokia.com |
|
4 DISPLAYNAME emirates |
|
5 NULL null |
|
6 NOTNULL notnull |
|
7 |
|
8 // --- Flags to indicate the type of params, for test cases 11-17 |
|
9 |
|
10 SINGLE_VALID_CONTACT 1 |
|
11 SINGLE_NULL_CONTACT 2 |
|
12 AT_POSITIVE_INDEX 3 |
|
13 AT_NEGATIVE_INDEX 4 |
|
14 AT_ZERO_INDEX 5 |
|
15 SAME_CONTACT 6 |
|
16 DIFFERENT_CONTACTS 7 |
|
17 |
|
18 // --- Flags to indicate the type of params, for test cases 18-19 |
|
19 |
|
20 MULTIPLE_CONTACTS 1 |
|
21 ZERO_CONTACTS 2 |
|
22 |
|
23 // --- Flags to indicate the type of filters ( params ), for test cases 20-23 |
|
24 |
|
25 FILTER1 1 |
|
26 FILTER2 2 |
|
27 FILTER3 3 |
|
28 ALLFILTER 4 |
|
29 NOFILTER 5 |
|
30 |
|
31 // --- Flags to indicate the type of filters ( params ), for test cases 25-27 |
|
32 |
|
33 FILTEREDCOUNT1 6 |
|
34 FILTEREDCOUNT2 7 |
|
35 FILTEREDCOUNT3 8 |
|
36 |
|
37 // --- Flags to indicate filters |
|
38 |
|
39 FILTERNOTDEFINED -1 |
|
40 FILTERALL 0 |
|
41 FILTERANDOPERATION 1 |
|
42 FILTERONLINE 2 |
|
43 FILTERNONBLOCKED 4 |
|
44 FILTERAWAY 8 |
|
45 FILTERNONOFFLINE 16 |
|
46 |
|
47 |
|
48 [Enddefine] |
|
49 |
|
50 [Test] |
|
51 |
|
52 // --- Test cases 1 to 8, test the NewL function --- |
|
53 |
|
54 // --- Test Case with valid listid, valid displayname, valid contactsorter |
|
55 title 1.Test_NewL_valid_listid_valid_displayname |
|
56 create CVIMPSTStorageContactList_UT foobar |
|
57 foobar Test_NewL LISTID DISPLAYNAME |
|
58 delete foobar |
|
59 [Endtest] |
|
60 |
|
61 // --- Test Case with valid listid, null displayname, valid contactsorter |
|
62 [Test] |
|
63 title 2.Test_NewL_valid_listid_null_displayname |
|
64 create CVIMPSTStorageContactList_UT foobar |
|
65 foobar Test_NewL LISTID NULL |
|
66 delete foobar |
|
67 [Endtest] |
|
68 |
|
69 // --- Test Case with null listid, valid displayname, valid contactsorter |
|
70 [Test] |
|
71 title 3.Test_NewL_null_listid_valid_displayname |
|
72 create CVIMPSTStorageContactList_UT foobar |
|
73 foobar Test_NewL NULL DISPLAYNAME |
|
74 delete foobar |
|
75 [Endtest] |
|
76 |
|
77 // --- Test Case with null listid, null displayname, valid contactsorter |
|
78 [Test] |
|
79 title 4.Test_NewL_null_listid_null_displayname |
|
80 create CVIMPSTStorageContactList_UT foobar |
|
81 foobar Test_NewL NULL NULL |
|
82 delete foobar |
|
83 [Endtest] |
|
84 |
|
85 // --- Test Case 5-6 to test ListId() function |
|
86 |
|
87 [Test] |
|
88 title 5.Test_ListId_valid_listid |
|
89 create CVIMPSTStorageContactList_UT foobar |
|
90 foobar Test_ListId LISTID |
|
91 delete foobar |
|
92 [Endtest] |
|
93 |
|
94 [Test] |
|
95 title 6.Test_ListId_null_listid |
|
96 create CVIMPSTStorageContactList_UT foobar |
|
97 foobar Test_ListId NULL |
|
98 delete foobar |
|
99 [Endtest] |
|
100 |
|
101 // --- Test Case 7-8 to test DisplayName function |
|
102 |
|
103 [Test] |
|
104 title 7.Test_DisplayName_valid_displayname |
|
105 create CVIMPSTStorageContactList_UT foobar |
|
106 foobar Test_DisplayName DISPLAYNAME LISTID |
|
107 delete foobar |
|
108 [Endtest] |
|
109 |
|
110 [Test] |
|
111 title 8.Test_DisplayName_null_displayname |
|
112 create CVIMPSTStorageContactList_UT foobar |
|
113 foobar Test_DisplayName NULL LISTID |
|
114 delete foobar |
|
115 [Endtest] |
|
116 |
|
117 // --- Test Case 9-10 to test Count function |
|
118 [Test] |
|
119 title 9.Test_Count_Positive_Count |
|
120 create CVIMPSTStorageContactList_UT foobar |
|
121 foobar Test_Count 1 |
|
122 delete foobar |
|
123 [Endtest] |
|
124 |
|
125 [Test] |
|
126 title 10.Test_Count_Negative_Count |
|
127 create CVIMPSTStorageContactList_UT foobar |
|
128 foobar Test_Count 2 |
|
129 delete foobar |
|
130 [Endtest] |
|
131 |
|
132 // --- Test Case 11- to test AddStorageContacttoCacheL function |
|
133 [Test] |
|
134 title 11.Test_AddContactToList-SINGLE_VALID_CONTACT |
|
135 create CVIMPSTStorageContactList_UT foobar |
|
136 foobar Test_AddContactToList SINGLE_VALID_CONTACT |
|
137 delete foobar |
|
138 [Endtest] |
|
139 |
|
140 [Test] |
|
141 title 12.Test_AddContactToList-SINGLE_NULL_CONTACT |
|
142 create CVIMPSTStorageContactList_UT foobar |
|
143 foobar Test_AddContactToList SINGLE_NULL_CONTACT |
|
144 delete foobar |
|
145 [Endtest] |
|
146 |
|
147 [Test] |
|
148 title 13.Test_AddContactToList-AT_POSITIVE_INDEX |
|
149 create CVIMPSTStorageContactList_UT foobar |
|
150 foobar Test_AddContactToList AT_POSITIVE_INDEX |
|
151 delete foobar |
|
152 [Endtest] |
|
153 |
|
154 [Test] |
|
155 title 14.Test_AddContactToList-AT_NEGATIVE_INDEX |
|
156 create CVIMPSTStorageContactList_UT foobar |
|
157 foobar Test_AddContactToList AT_NEGATIVE_INDEX |
|
158 delete foobar |
|
159 [Endtest] |
|
160 |
|
161 [Test] |
|
162 title 15.Test_AddContactToList-AT_ZERO_INDEX |
|
163 create CVIMPSTStorageContactList_UT foobar |
|
164 foobar Test_AddContactToList AT_ZERO_INDEX |
|
165 delete foobar |
|
166 [Endtest] |
|
167 |
|
168 [Test] |
|
169 title 16.Test_AddContactToList-SAME_CONTACT |
|
170 create CVIMPSTStorageContactList_UT foobar |
|
171 foobar Test_AddContactToList SAME_CONTACT |
|
172 delete foobar |
|
173 [Endtest] |
|
174 |
|
175 [Test] |
|
176 title 17.Test_AddContactToList-DIFFERENT_CONTACTS |
|
177 create CVIMPSTStorageContactList_UT foobar |
|
178 foobar Test_AddContactToList DIFFERENT_CONTACTS |
|
179 delete foobar |
|
180 [Endtest] |
|
181 |
|
182 // --- Test cases to test the Count function |
|
183 |
|
184 [Test] |
|
185 title 18.Test_Count-MULTIPLE_CONTACTS |
|
186 create CVIMPSTStorageContactList_UT foobar |
|
187 foobar Test_Count MULTIPLE_CONTACTS |
|
188 delete foobar |
|
189 [Endtest] |
|
190 |
|
191 [Test] |
|
192 title 19.Test_Count-ZERO_CONTACTS |
|
193 create CVIMPSTStorageContactList_UT foobar |
|
194 foobar Test_Count ZERO_CONTACTS |
|
195 delete foobar |
|
196 [Endtest] |
|
197 |
|
198 // --- Test cases for FilteredContact function |
|
199 |
|
200 [Test] |
|
201 title 20.Test_FilteredContact-FILTER1 |
|
202 create CVIMPSTStorageContactList_UT foobar |
|
203 // Passing 1, indicating the test case variant. Map with |
|
204 // the list of unit test case in the xls. Similarly in |
|
205 // test cases 21 and 22. |
|
206 foobar Test_FilteredContact 1 |
|
207 delete foobar |
|
208 [Endtest] |
|
209 |
|
210 [Test] |
|
211 title 21.Test_FilteredContact-FILTER2 |
|
212 create CVIMPSTStorageContactList_UT foobar |
|
213 foobar Test_FilteredContact 2 |
|
214 delete foobar |
|
215 [Endtest] |
|
216 |
|
217 [Test] |
|
218 title 22.Test_FilteredContact-FILTER3 |
|
219 create CVIMPSTStorageContactList_UT foobar |
|
220 foobar Test_FilteredContact 3 |
|
221 delete foobar |
|
222 [Endtest] |
|
223 |
|
224 // --- Test Cases to check FilteredCount function |
|
225 |
|
226 [Test] |
|
227 title 25.Test_FilteredCount |
|
228 create CVIMPSTStorageContactList_UT foobar |
|
229 foobar Test_FilteredCount 1 |
|
230 delete foobar |
|
231 [Endtest] |
|
232 |
|
233 [Test] |
|
234 title 26.Test_FilteredCount |
|
235 create CVIMPSTStorageContactList_UT foobar |
|
236 foobar Test_FilteredCount 2 |
|
237 delete foobar |
|
238 [Endtest] |
|
239 |
|
240 [Test] |
|
241 title 27.Test_FilteredCount |
|
242 create CVIMPSTStorageContactList_UT foobar |
|
243 foobar Test_FilteredCount 3 |
|
244 delete foobar |
|
245 [Endtest] |
|
246 |
|
247 // --- FilterAllowsContact test cases --- |
|
248 |
|
249 [Test] |
|
250 title 28.Test_FilterAllowsContact |
|
251 create CVIMPSTStorageContactList_UT foobar |
|
252 foobar Test_FilterAllowsContact NULL FILTERNOTDEFINED 28 |
|
253 delete foobar |
|
254 [Endtest] |
|
255 |
|
256 [Test] |
|
257 title 29.Test_FilterAllowsContact |
|
258 create CVIMPSTStorageContactList_UT foobar |
|
259 foobar Test_FilterAllowsContact NOTNULL FILTERONLINE 29 |
|
260 delete foobar |
|
261 [Endtest] |
|
262 |
|
263 [Test] |
|
264 title 30.Test_FilterAllowsContact |
|
265 create CVIMPSTStorageContactList_UT foobar |
|
266 foobar Test_FilterAllowsContact NOTNULL FILTERAWAY 30 |
|
267 delete foobar |
|
268 [Endtest] |
|
269 |
|
270 [Test] |
|
271 title 31.Test_FilterAllowsContact |
|
272 create CVIMPSTStorageContactList_UT foobar |
|
273 foobar Test_FilterAllowsContact NOTNULL FILTERNOTDEFINED 31 |
|
274 delete foobar |
|
275 [Endtest] |
|
276 |
|
277 // --- FindIndexOfContact test cases --- |
|
278 |
|
279 [Test] |
|
280 title 32.Test_FilterAllowsContact |
|
281 create CVIMPSTStorageContactList_UT foobar |
|
282 foobar Test_FindIndexOfContact 1 |
|
283 delete foobar |
|
284 [Endtest] |
|
285 |
|
286 [Test] |
|
287 title 33.Test_FilterAllowsContact |
|
288 create CVIMPSTStorageContactList_UT foobar |
|
289 foobar Test_FindIndexOfContact 2 |
|
290 delete foobar |
|
291 [Endtest] |
|
292 |
|
293 [Test] |
|
294 title 34.Test_FindIndexOfContact |
|
295 create CVIMPSTStorageContactList_UT foobar |
|
296 foobar Test_FindIndexOfContact 3 |
|
297 delete foobar |
|
298 [Endtest] |
|
299 |