Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
utf8: Implemented further UTF8 support
[xestiacalendar/.git] / source / tests / xestiacalendar_icaltimezoneload.h
1 // xestiacalendar_icaltimezoneload.h - Xestia Calendar iCalendar Timezone Component Unit Tests
2 //
3 // (c) 2016-2017 Xestia Software Development.
4 //
5 // This file is part of Xestia Calendar.
6 //
7 // Xestia Calendar is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by the
9 // Free Software Foundation, version 3 of the license.
10 //
11 // Xestia Calendar is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License along
17 // with Xestia Calendar. If not, see <http://www.gnu.org/licenses/>
19 #include "../objects/calendartimezone/CalendarTimezone.h"
21 TEST(iCalendarTimezone, BasicTests){
23         CalendarTimezoneObject testTimezone;
24         
25         ASSERT_EQ(CALENDAROBJECTLOAD_MISSING, testTimezone.LoadFile("iCalendarTimezone-Missing.vcf"));
26         ASSERT_EQ(CALENDAROBJECTLOAD_CANNOTOPEN, testTimezone.LoadFile("iCalendarTimezone-InvalidPermissions.vcf"));
27         ASSERT_EQ(CALENDAROBJECTLOAD_OK, testTimezone.LoadFile("iCalendarTimezone-Load1.vcf"));
28         
29 }
31 TEST(iCalendarTimezone, ObjectDataTests){
32         
33         CalendarTimezoneObject testTimezone;
34         ASSERT_EQ(CALENDAROBJECTLOAD_OK, testTimezone.LoadFile("iCalendarTimezone-Load2.vcf"));
35         ASSERT_EQ(CALENDAROBJECTVALID_OK, testTimezone.ValidBaseObject());
36         
37         // Tests for UID.
38         
39         ASSERT_EQ("Example/Starrgazy", testTimezone.timeZoneData);
40         ASSERT_EQ("OTHER=PARAM", testTimezone.timeZoneDataTokens);
41         
42         // Tests for LAST-MODIFIED.
43         
44         ASSERT_EQ("20160203T200700Z", testTimezone.lastModifiedData);
45         ASSERT_EQ("FUTURE=ODD", testTimezone.lastModifiedTokens);
47         // Tests for TZURL.
48         
49         ASSERT_EQ("http://www.example.com/", testTimezone.timeZoneURLData);
50         ASSERT_EQ("URL=YES", testTimezone.timeZoneURLTokens);
51         
52         // Tests for the first STANDARD data.
53         
54         std::string dateTimeStartData;
55         std::string timeZoneOffsetToData;
56         std::string timeZoneOffsetFromData;
57         
58         if (testTimezone.timezoneStandardCollection.size() > 0){
59         
60                 dateTimeStartData = testTimezone.timezoneStandardCollection[0].dateTimeStartData;
61         
62         }
64         if (testTimezone.timezoneStandardCollection.size() > 0){
65         
66                 timeZoneOffsetToData = testTimezone.timezoneStandardCollection[0].timeZoneOffsetToData;
67         
68         }
69         
70         if (testTimezone.timezoneStandardCollection.size() > 0){
71         
72                 timeZoneOffsetFromData = testTimezone.timezoneStandardCollection[0].timeZoneOffsetFromData;
73         
74         }
75         
76         ASSERT_EQ("20160204T020000", dateTimeStartData);
77         ASSERT_EQ("-0400", timeZoneOffsetToData);
78         ASSERT_EQ("-0500", timeZoneOffsetFromData);
79         
80         // Tests for the second STANDARD data.
81         
82         std::string dateTimeStartTokens;
83         std::string timeZoneOffsetToTokens;
84         std::string timeZoneOffsetFromTokens;
85         
86         std::string recurranceRuleData;
87         std::string recurranceRuleDataTokens;
88         
89         std::string commentList;
90         std::string commentListAltRep;
91         std::string commentListLanguage;
92         std::string commentListTokens;
93         
94         std::string recurranceDateData;
95         std::string recurranceDateValue;
96         std::string recurranceDateDataTimeZoneParam;
97         std::string recurranceDateDataTokens;
98         
99         std::string timeZoneNameData;
100         std::string timeZoneNameLanguage;
101         std::string timeZoneNameTokens;
102         
103         std::string xTokensData;
104         std::string xTokensDataTokens;
105         
106         dateTimeStartData.clear();
107         timeZoneOffsetToData.clear();
108         timeZoneOffsetFromData.clear();
109         
110         if (testTimezone.timezoneStandardCollection.size() > 1){
111         
112                 dateTimeStartData = testTimezone.timezoneStandardCollection[1].dateTimeStartData;
113                 dateTimeStartTokens = testTimezone.timezoneStandardCollection[1].dateTimeStartTokens;
114         
115         }
117         if (testTimezone.timezoneStandardCollection.size() > 1){
118         
119                 timeZoneOffsetToData = testTimezone.timezoneStandardCollection[1].timeZoneOffsetToData;
120                 timeZoneOffsetToTokens = testTimezone.timezoneStandardCollection[1].timeZoneOffsetToTokens;
121         
122         }
123         
124         if (testTimezone.timezoneStandardCollection.size() > 1){
125         
126                 timeZoneOffsetFromData = testTimezone.timezoneStandardCollection[1].timeZoneOffsetFromData;
127                 timeZoneOffsetFromTokens = testTimezone.timezoneStandardCollection[1].timeZoneOffsetFromTokens;
128         
129         }
130         
131         ASSERT_EQ("20160205T020000", dateTimeStartData);
132         ASSERT_EQ("MEEP=MOO", dateTimeStartTokens);
133         ASSERT_EQ("-0400", timeZoneOffsetToData);
134         ASSERT_EQ("EXAMPLE=DATA", timeZoneOffsetToTokens);
135         ASSERT_EQ("-0500", timeZoneOffsetFromData);
136         ASSERT_EQ("LETS=GO", timeZoneOffsetFromTokens);
137         
138         // Tests for third STANDARD data.
139         
140         dateTimeStartData.clear();
141         dateTimeStartTokens.clear();
142         timeZoneOffsetToData.clear();
143         timeZoneOffsetToTokens.clear();
144         timeZoneOffsetFromData.clear();
145         timeZoneOffsetFromTokens.clear();
146         
147         if (testTimezone.timezoneStandardCollection.size() > 2){
148         
149                 dateTimeStartData = testTimezone.timezoneStandardCollection[2].dateTimeStartData;
150                 dateTimeStartTokens = testTimezone.timezoneStandardCollection[2].dateTimeStartTokens;
151         
152         }
154         if (testTimezone.timezoneStandardCollection.size() > 2){
155         
156                 timeZoneOffsetToData = testTimezone.timezoneStandardCollection[2].timeZoneOffsetToData;
157                 timeZoneOffsetToTokens = testTimezone.timezoneStandardCollection[2].timeZoneOffsetToTokens;
158         
159         }
160         
161         if (testTimezone.timezoneStandardCollection.size() > 2){
162         
163                 timeZoneOffsetFromData = testTimezone.timezoneStandardCollection[2].timeZoneOffsetFromData;
164                 timeZoneOffsetFromTokens = testTimezone.timezoneStandardCollection[2].timeZoneOffsetFromTokens;
165         
166         }
167         
168         if (testTimezone.timezoneStandardCollection.size() > 2 && 
169                 testTimezone.timezoneStandardCollection[2].commentList.size() > 0){
170                 
171                 commentList = testTimezone.timezoneStandardCollection[2].commentList[0];
172                 commentListAltRep = testTimezone.timezoneStandardCollection[2].commentListAltRep[0];
173                 commentListLanguage = testTimezone.timezoneStandardCollection[2].commentListLanguage[0];
174                 commentListTokens = testTimezone.timezoneStandardCollection[2].commentListTokens[0];
175                         
176         }
177         
178         if (testTimezone.timezoneStandardCollection.size() > 2 && 
179                 testTimezone.timezoneStandardCollection[2].recurranceRuleData.size() > 0){
180                 
181                 recurranceRuleData = testTimezone.timezoneStandardCollection[2].recurranceRuleData;
182                 recurranceRuleDataTokens = testTimezone.timezoneStandardCollection[2].recurranceRuleDataTokens;
183                         
184         }
186         if (testTimezone.timezoneStandardCollection.size() > 2 && 
187                 testTimezone.timezoneStandardCollection[2].recurranceDateData.size() > 0){
188                 
189                 recurranceDateData = testTimezone.timezoneStandardCollection[2].recurranceDateData[0];
190                 recurranceDateValue = testTimezone.timezoneStandardCollection[2].recurranceDateDataValue[0];
191                 recurranceDateDataTimeZoneParam = testTimezone.timezoneStandardCollection[2].recurranceDateDataTimeZoneParam[0];
192                 recurranceDateDataTokens = testTimezone.timezoneStandardCollection[2].recurranceDateDataTokens[0];
193                         
194         }
195         
196         if (testTimezone.timezoneStandardCollection.size() > 2 && 
197                 testTimezone.timezoneStandardCollection[2].timeZoneNameData.size() > 0){
198                 
199                 timeZoneNameData = testTimezone.timezoneStandardCollection[2].timeZoneNameData[0];
200                 timeZoneNameLanguage = testTimezone.timezoneStandardCollection[2].timeZoneNameLanguage[0];
201                 timeZoneNameTokens = testTimezone.timezoneStandardCollection[2].timeZoneNameTokens[0];
202                         
203         }
204         
205         if (testTimezone.timezoneStandardCollection.size() > 2 && 
206                 testTimezone.timezoneStandardCollection[2].xTokensData.size() > 0){
207                 
208                 xTokensData = testTimezone.timezoneStandardCollection[2].xTokensData[0];
209                 xTokensDataTokens = testTimezone.timezoneStandardCollection[2].xTokensDataTokens[0];
210                         
211         }
212         
213         ASSERT_EQ("20160206T020000", dateTimeStartData);
214         ASSERT_EQ("MEEP=MOO", dateTimeStartTokens);
215         ASSERT_EQ("-0400", timeZoneOffsetToData);
216         ASSERT_EQ("EXAMPLE=DATA", timeZoneOffsetToTokens);
217         ASSERT_EQ("-0500", timeZoneOffsetFromData);
218         ASSERT_EQ("LETS=GO", timeZoneOffsetFromTokens);
220         ASSERT_EQ("Example timezone comment.", commentList);
221         ASSERT_EQ("null:nodata", commentListAltRep);
222         ASSERT_EQ("kw", commentListLanguage);
223         ASSERT_EQ("YO=YOYOS", commentListTokens);
225         ASSERT_EQ("FREQ=DAILY;COUNT=10", recurranceRuleData);
226         ASSERT_EQ("YAK=YES", recurranceRuleDataTokens);
227         
228         ASSERT_EQ("20160205,20160207,20160216,20160305", recurranceDateData);
229         ASSERT_EQ("DATE", recurranceDateValue);
230         ASSERT_EQ("Europe/Truro", recurranceDateDataTimeZoneParam);
231         ASSERT_EQ("BEEP=BOOP", recurranceDateDataTokens);
233         ASSERT_EQ("Example Timezone Name 1", timeZoneNameData);
234         ASSERT_EQ("en", timeZoneNameLanguage);
235         ASSERT_EQ("NOPE=YES", timeZoneNameTokens);
237         ASSERT_EQ("Example Timezone Name 1", timeZoneNameData);
238         ASSERT_EQ("en", timeZoneNameLanguage);
240         ASSERT_EQ("Meep", xTokensData);
241         ASSERT_EQ("X-MOO", xTokensDataTokens);
243         xTokensData.clear();
244         xTokensDataTokens.clear();
246         if (testTimezone.timezoneStandardCollection.size() > 2 && 
247                 testTimezone.timezoneStandardCollection[2].xTokensData.size() > 1){
248                 
249                 xTokensData = testTimezone.timezoneStandardCollection[2].xTokensData[1];
250                 xTokensDataTokens = testTimezone.timezoneStandardCollection[2].xTokensDataTokens[1];
251                         
252         }
254         ASSERT_EQ("Moop", xTokensData);
255         ASSERT_EQ("X-MOO", xTokensDataTokens);
256         
257         xTokensData.clear();
258         xTokensDataTokens.clear();
259         
260         if (testTimezone.timezoneStandardCollection.size() > 2 && 
261                 testTimezone.timezoneStandardCollection[2].xTokensData.size() > 2){
262                 
263                 xTokensData = testTimezone.timezoneStandardCollection[2].xTokensData[2];
264                 xTokensDataTokens = testTimezone.timezoneStandardCollection[2].xTokensDataTokens[2];
265                         
266         }
268         ASSERT_EQ("Zaap", xTokensData);
269         ASSERT_EQ("X-MOO;MEEP=YIKES", xTokensDataTokens);
270         
271         xTokensData.clear();
272         xTokensDataTokens.clear();
274         if (testTimezone.timezoneStandardCollection.size() > 2 && 
275                 testTimezone.timezoneStandardCollection[2].xTokensData.size() > 3){
276                 
277                 xTokensData = testTimezone.timezoneStandardCollection[2].xTokensData[3];
278                 xTokensDataTokens = testTimezone.timezoneStandardCollection[2].xTokensDataTokens[3];
279                         
280         }
282         ASSERT_EQ("Fork", xTokensData);
283         ASSERT_EQ("X-ITEM", xTokensDataTokens);
284         
285         xTokensData.clear();
286         xTokensDataTokens.clear();
287         
288         if (testTimezone.timezoneStandardCollection.size() > 2 && 
289                 testTimezone.timezoneStandardCollection[2].xTokensData.size() > 4){
290                 
291                 xTokensData = testTimezone.timezoneStandardCollection[2].xTokensData[4];
292                 xTokensDataTokens = testTimezone.timezoneStandardCollection[2].xTokensDataTokens[4];
293                         
294         }
296         ASSERT_EQ("Spoon", xTokensData);
297         ASSERT_EQ("X-ITEM", xTokensDataTokens);
298         
299         xTokensData.clear();
300         xTokensDataTokens.clear();
301         
302         if (testTimezone.timezoneStandardCollection.size() > 2 && 
303                 testTimezone.timezoneStandardCollection[2].xTokensData.size() > 5){
304                 
305                 xTokensData = testTimezone.timezoneStandardCollection[2].xTokensData[5];
306                 xTokensDataTokens = testTimezone.timezoneStandardCollection[2].xTokensDataTokens[5];
307                         
308         }
310         ASSERT_EQ("Knife", xTokensData);
311         ASSERT_EQ("X-ITEM;DIRTY=NO", xTokensDataTokens);
312         
313         xTokensData.clear();
314         xTokensDataTokens.clear();
316         if (testTimezone.timezoneStandardCollection.size() > 2 && 
317                 testTimezone.timezoneStandardCollection[2].xTokensData.size() > 6){
318                 
319                 xTokensData = testTimezone.timezoneStandardCollection[2].xTokensData[6];
320                 xTokensDataTokens = testTimezone.timezoneStandardCollection[2].xTokensDataTokens[6];
321                         
322         }
324         ASSERT_EQ("1", xTokensData);
325         ASSERT_EQ("X-NOPE", xTokensDataTokens);
326         
327         xTokensData.clear();
328         xTokensDataTokens.clear();
329         
330         if (testTimezone.timezoneStandardCollection.size() > 2 && 
331                 testTimezone.timezoneStandardCollection[2].xTokensData.size() > 7){
332                 
333                 xTokensData = testTimezone.timezoneStandardCollection[2].xTokensData[7];
334                 xTokensDataTokens = testTimezone.timezoneStandardCollection[2].xTokensDataTokens[7];
335                         
336         }
338         ASSERT_EQ("2", xTokensData);
339         ASSERT_EQ("X-NOPE", xTokensDataTokens);
340         
341         xTokensData.clear();
342         xTokensDataTokens.clear();
343         
344         if (testTimezone.timezoneStandardCollection.size() > 2 && 
345                 testTimezone.timezoneStandardCollection[2].xTokensData.size() > 8){
346                 
347                 xTokensData = testTimezone.timezoneStandardCollection[2].xTokensData[8];
348                 xTokensDataTokens = testTimezone.timezoneStandardCollection[2].xTokensDataTokens[8];
349                         
350         }
352         ASSERT_EQ("3", xTokensData);
353         ASSERT_EQ("X-NOPE;LONG=YES", xTokensDataTokens);
354         
355         // Tests for the first DAYLIGHT data.
356         
357         dateTimeStartData.clear();
358         timeZoneOffsetToData.clear();
359         timeZoneOffsetFromData.clear();
360         
361         if (testTimezone.timezoneDaylightCollection.size() > 0){
362         
363                 dateTimeStartData = testTimezone.timezoneDaylightCollection[0].dateTimeStartData;
364         
365         }
367         if (testTimezone.timezoneDaylightCollection.size() > 0){
368         
369                 timeZoneOffsetToData = testTimezone.timezoneDaylightCollection[0].timeZoneOffsetToData;
370         
371         }
372         
373         if (testTimezone.timezoneDaylightCollection.size() > 0){
374         
375                 timeZoneOffsetFromData = testTimezone.timezoneDaylightCollection[0].timeZoneOffsetFromData;
376         
377         }
378         
379         ASSERT_EQ("20160204T020000", dateTimeStartData);
380         ASSERT_EQ("-0400", timeZoneOffsetToData);
381         ASSERT_EQ("-0500", timeZoneOffsetFromData);
382         
383         // Tests for the second DAYLIGHT data.
384         
385         dateTimeStartTokens.clear();
386         timeZoneOffsetToTokens.clear();
387         timeZoneOffsetFromTokens.clear();
388         
389         recurranceRuleData.clear();
390         recurranceRuleDataTokens.clear();
391         
392         commentList.clear();
393         commentListAltRep.clear();
394         commentListLanguage.clear();
395         commentListTokens.clear();
396         
397         recurranceDateData.clear();
398         recurranceDateValue.clear();
399         recurranceDateDataTimeZoneParam.clear();
400         recurranceDateDataTokens.clear();
401         
402         timeZoneNameData.clear();
403         timeZoneNameLanguage.clear();
404         timeZoneNameTokens.clear();
405         
406         xTokensData.clear();
407         xTokensDataTokens.clear();
408         
409         dateTimeStartData.clear();
410         timeZoneOffsetToData.clear();
411         timeZoneOffsetFromData.clear();
412         
413         if (testTimezone.timezoneDaylightCollection.size() > 1){
414         
415                 dateTimeStartData = testTimezone.timezoneDaylightCollection[1].dateTimeStartData;
416                 dateTimeStartTokens = testTimezone.timezoneDaylightCollection[1].dateTimeStartTokens;
417         
418         }
420         if (testTimezone.timezoneDaylightCollection.size() > 1){
421         
422                 timeZoneOffsetToData = testTimezone.timezoneDaylightCollection[1].timeZoneOffsetToData;
423                 timeZoneOffsetToTokens = testTimezone.timezoneDaylightCollection[1].timeZoneOffsetToTokens;
424         
425         }
426         
427         if (testTimezone.timezoneDaylightCollection.size() > 1){
428         
429                 timeZoneOffsetFromData = testTimezone.timezoneDaylightCollection[1].timeZoneOffsetFromData;
430                 timeZoneOffsetFromTokens = testTimezone.timezoneDaylightCollection[1].timeZoneOffsetFromTokens;
431         
432         }
433         
434         ASSERT_EQ("20160205T020000", dateTimeStartData);
435         ASSERT_EQ("MEEP=MOO", dateTimeStartTokens);
436         ASSERT_EQ("-0400", timeZoneOffsetToData);
437         ASSERT_EQ("EXAMPLE=DATA", timeZoneOffsetToTokens);
438         ASSERT_EQ("-0500", timeZoneOffsetFromData);
439         ASSERT_EQ("LETS=GO", timeZoneOffsetFromTokens);
440         
441         // Tests for third DAYLIGHT data.
442         
443         dateTimeStartData.clear();
444         dateTimeStartTokens.clear();
445         timeZoneOffsetToData.clear();
446         timeZoneOffsetToTokens.clear();
447         timeZoneOffsetFromData.clear();
448         timeZoneOffsetFromTokens.clear();
449         
450         if (testTimezone.timezoneDaylightCollection.size() > 2){
451         
452                 dateTimeStartData = testTimezone.timezoneDaylightCollection[2].dateTimeStartData;
453                 dateTimeStartTokens = testTimezone.timezoneDaylightCollection[2].dateTimeStartTokens;
454         
455         }
457         if (testTimezone.timezoneDaylightCollection.size() > 2){
458         
459                 timeZoneOffsetToData = testTimezone.timezoneDaylightCollection[2].timeZoneOffsetToData;
460                 timeZoneOffsetToTokens = testTimezone.timezoneDaylightCollection[2].timeZoneOffsetToTokens;
461         
462         }
463         
464         if (testTimezone.timezoneDaylightCollection.size() > 2){
465         
466                 timeZoneOffsetFromData = testTimezone.timezoneDaylightCollection[2].timeZoneOffsetFromData;
467                 timeZoneOffsetFromTokens = testTimezone.timezoneDaylightCollection[2].timeZoneOffsetFromTokens;
468         
469         }
470         
471         if (testTimezone.timezoneDaylightCollection.size() > 2 && 
472                 testTimezone.timezoneDaylightCollection[2].commentList.size() > 0){
473                 
474                 commentList = testTimezone.timezoneDaylightCollection[2].commentList[0];
475                 commentListAltRep = testTimezone.timezoneDaylightCollection[2].commentListAltRep[0];
476                 commentListLanguage = testTimezone.timezoneDaylightCollection[2].commentListLanguage[0];
477                 commentListTokens = testTimezone.timezoneDaylightCollection[2].commentListTokens[0];
478                         
479         }
480         
481         if (testTimezone.timezoneDaylightCollection.size() > 2 && 
482                 testTimezone.timezoneDaylightCollection[2].recurranceRuleData.size() > 0){
483                 
484                 recurranceRuleData = testTimezone.timezoneDaylightCollection[2].recurranceRuleData;
485                 recurranceRuleDataTokens = testTimezone.timezoneDaylightCollection[2].recurranceRuleDataTokens;
486                         
487         }
489         if (testTimezone.timezoneDaylightCollection.size() > 2 && 
490                 testTimezone.timezoneDaylightCollection[2].recurranceDateData.size() > 0){
491                 
492                 recurranceDateData = testTimezone.timezoneDaylightCollection[2].recurranceDateData[0];
493                 recurranceDateValue = testTimezone.timezoneDaylightCollection[2].recurranceDateDataValue[0];
494                 recurranceDateDataTimeZoneParam = testTimezone.timezoneDaylightCollection[2].recurranceDateDataTimeZoneParam[0];
495                 recurranceDateDataTokens = testTimezone.timezoneDaylightCollection[2].recurranceDateDataTokens[0];
496                         
497         }
498         
499         if (testTimezone.timezoneDaylightCollection.size() > 2 && 
500                 testTimezone.timezoneDaylightCollection[2].timeZoneNameData.size() > 0){
501                 
502                 timeZoneNameData = testTimezone.timezoneDaylightCollection[2].timeZoneNameData[0];
503                 timeZoneNameLanguage = testTimezone.timezoneDaylightCollection[2].timeZoneNameLanguage[0];
504                 timeZoneNameTokens = testTimezone.timezoneDaylightCollection[2].timeZoneNameTokens[0];
505                         
506         }
507         
508         if (testTimezone.timezoneDaylightCollection.size() > 2 && 
509                 testTimezone.timezoneDaylightCollection[2].xTokensData.size() > 0){
510                 
511                 xTokensData = testTimezone.timezoneDaylightCollection[2].xTokensData[0];
512                 xTokensDataTokens = testTimezone.timezoneDaylightCollection[2].xTokensDataTokens[0];
513                         
514         }
515         
516         ASSERT_EQ("20160206T020000", dateTimeStartData);
517         ASSERT_EQ("MEEP=MOO", dateTimeStartTokens);
518         ASSERT_EQ("-0400", timeZoneOffsetToData);
519         ASSERT_EQ("EXAMPLE=DATA", timeZoneOffsetToTokens);
520         ASSERT_EQ("-0500", timeZoneOffsetFromData);
521         ASSERT_EQ("LETS=GO", timeZoneOffsetFromTokens);
523         ASSERT_EQ("Example timezone comment.", commentList);
524         ASSERT_EQ("null:nodata", commentListAltRep);
525         ASSERT_EQ("kw", commentListLanguage);
526         ASSERT_EQ("YO=YOYOS", commentListTokens);
528         ASSERT_EQ("FREQ=DAILY;COUNT=10", recurranceRuleData);
529         ASSERT_EQ("YAK=YES", recurranceRuleDataTokens);
530         
531         ASSERT_EQ("20160205,20160207,20160216,20160305", recurranceDateData);
532         ASSERT_EQ("DATE", recurranceDateValue);
533         ASSERT_EQ("Europe/Truro", recurranceDateDataTimeZoneParam);
534         ASSERT_EQ("BEEP=BOOP", recurranceDateDataTokens);
536         ASSERT_EQ("Example Timezone Name 1", timeZoneNameData);
537         ASSERT_EQ("en", timeZoneNameLanguage);
538         ASSERT_EQ("NOPE=YES", timeZoneNameTokens);
540         ASSERT_EQ("Example Timezone Name 1", timeZoneNameData);
541         ASSERT_EQ("en", timeZoneNameLanguage);
543         ASSERT_EQ("Meep", xTokensData);
544         ASSERT_EQ("X-MOO", xTokensDataTokens);
546         xTokensData.clear();
547         xTokensDataTokens.clear();
549         if (testTimezone.timezoneDaylightCollection.size() > 2 && 
550                 testTimezone.timezoneDaylightCollection[2].xTokensData.size() > 1){
551                 
552                 xTokensData = testTimezone.timezoneDaylightCollection[2].xTokensData[1];
553                 xTokensDataTokens = testTimezone.timezoneDaylightCollection[2].xTokensDataTokens[1];
554                         
555         }
557         ASSERT_EQ("Moop", xTokensData);
558         ASSERT_EQ("X-MOO", xTokensDataTokens);
559         
560         xTokensData.clear();
561         xTokensDataTokens.clear();
562         
563         if (testTimezone.timezoneDaylightCollection.size() > 2 && 
564                 testTimezone.timezoneDaylightCollection[2].xTokensData.size() > 2){
565                 
566                 xTokensData = testTimezone.timezoneDaylightCollection[2].xTokensData[2];
567                 xTokensDataTokens = testTimezone.timezoneDaylightCollection[2].xTokensDataTokens[2];
568                         
569         }
571         ASSERT_EQ("Zaap", xTokensData);
572         ASSERT_EQ("X-MOO;MEEP=YIKES", xTokensDataTokens);
573         
574         xTokensData.clear();
575         xTokensDataTokens.clear();
577         if (testTimezone.timezoneDaylightCollection.size() > 2 && 
578                 testTimezone.timezoneDaylightCollection[2].xTokensData.size() > 3){
579                 
580                 xTokensData = testTimezone.timezoneDaylightCollection[2].xTokensData[3];
581                 xTokensDataTokens = testTimezone.timezoneDaylightCollection[2].xTokensDataTokens[3];
582                         
583         }
585         ASSERT_EQ("Fork", xTokensData);
586         ASSERT_EQ("X-ITEM", xTokensDataTokens);
587         
588         xTokensData.clear();
589         xTokensDataTokens.clear();
590         
591         if (testTimezone.timezoneDaylightCollection.size() > 2 && 
592                 testTimezone.timezoneDaylightCollection[2].xTokensData.size() > 4){
593                 
594                 xTokensData = testTimezone.timezoneDaylightCollection[2].xTokensData[4];
595                 xTokensDataTokens = testTimezone.timezoneDaylightCollection[2].xTokensDataTokens[4];
596                         
597         }
599         ASSERT_EQ("Spoon", xTokensData);
600         ASSERT_EQ("X-ITEM", xTokensDataTokens);
601         
602         xTokensData.clear();
603         xTokensDataTokens.clear();
604         
605         if (testTimezone.timezoneDaylightCollection.size() > 2 && 
606                 testTimezone.timezoneDaylightCollection[2].xTokensData.size() > 5){
607                 
608                 xTokensData = testTimezone.timezoneDaylightCollection[2].xTokensData[5];
609                 xTokensDataTokens = testTimezone.timezoneDaylightCollection[2].xTokensDataTokens[5];
610                         
611         }
613         ASSERT_EQ("Knife", xTokensData);
614         ASSERT_EQ("X-ITEM;DIRTY=NO", xTokensDataTokens);
615         
616         xTokensData.clear();
617         xTokensDataTokens.clear();
619         if (testTimezone.timezoneDaylightCollection.size() > 2 && 
620                 testTimezone.timezoneDaylightCollection[2].xTokensData.size() > 6){
621                 
622                 xTokensData = testTimezone.timezoneDaylightCollection[2].xTokensData[6];
623                 xTokensDataTokens = testTimezone.timezoneDaylightCollection[2].xTokensDataTokens[6];
624                         
625         }
627         ASSERT_EQ("1", xTokensData);
628         ASSERT_EQ("X-NOPE", xTokensDataTokens);
629         
630         xTokensData.clear();
631         xTokensDataTokens.clear();
632         
633         if (testTimezone.timezoneDaylightCollection.size() > 2 && 
634                 testTimezone.timezoneDaylightCollection[2].xTokensData.size() > 7){
635                 
636                 xTokensData = testTimezone.timezoneDaylightCollection[2].xTokensData[7];
637                 xTokensDataTokens = testTimezone.timezoneDaylightCollection[2].xTokensDataTokens[7];
638                         
639         }
641         ASSERT_EQ("2", xTokensData);
642         ASSERT_EQ("X-NOPE", xTokensDataTokens);
643         
644         xTokensData.clear();
645         xTokensDataTokens.clear();
646         
647         if (testTimezone.timezoneDaylightCollection.size() > 2 && 
648                 testTimezone.timezoneDaylightCollection[2].xTokensData.size() > 8){
649                 
650                 xTokensData = testTimezone.timezoneDaylightCollection[2].xTokensData[8];
651                 xTokensDataTokens = testTimezone.timezoneDaylightCollection[2].xTokensDataTokens[8];
652                         
653         }
655         ASSERT_EQ("3", xTokensData);
656         ASSERT_EQ("X-NOPE;LONG=YES", xTokensDataTokens);
657         
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy