Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added ATTACH property for saving data from a CalendarEventObject.
[xestiacalendar/.git] / source / tests / xestiacalendar_icaltimezoneload.h
1 // xestiacalendar_icaltimezoneload.h - Xestia Calendar iCalendar Timezone Component Unit Tests
2 //
3 // (c) 2016 Xestia Software Development.
4 //
5 // This file is part of Xestia Calendar.
6 //
7 // Xestia Address Book 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 Address Book 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