1 // xestiacalendar_icaljournalload.h - Xestia Calendar iCalendar Journal Component Unit Tests
3 // (c) 2016-2017 Xestia Software Development.
5 // This file is part of Xestia Calendar.
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.
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.
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/calendarjournal/CalendarJournal.h"
21 TEST(iCalendarJournal, BasicTests){
23 CalendarJournalObject testJournal;
25 ASSERT_EQ(CALENDAROBJECTLOAD_MISSING, testJournal.LoadFile("iCalendarJournal-Missing.vcf"));
26 ASSERT_EQ(CALENDAROBJECTLOAD_CANNOTOPEN, testJournal.LoadFile("iCalendarJournal-InvalidPermissions.vcf"));
27 ASSERT_EQ(CALENDAROBJECTLOAD_OK, testJournal.LoadFile("iCalendarJournal-Load1.vcf"));
31 TEST(iCalendarJournal, ObjectDataTests){
33 CalendarJournalObject testJournal;
34 ASSERT_EQ(CALENDAROBJECTLOAD_OK, testJournal.LoadFile("iCalendarJournal-Load2.vcf"));
35 ASSERT_EQ(CALENDAROBJECTVALID_OK, testJournal.ValidBaseObject());
39 ASSERT_EQ("20160131T141500Z", testJournal.dateTimeStampData);
40 ASSERT_EQ("OTHER=PARAM", testJournal.dateTimeStampTokens);
44 ASSERT_EQ("b3a16392-ad86-4061-be53-c215af2306c1", testJournal.uniqueID);
45 ASSERT_EQ("UNIQUEPARAM=CERTAINLY;OKAY=MAYBENOT", testJournal.uniqueIDTokens);
49 ASSERT_EQ("PUBLIC", testJournal.classData);
50 ASSERT_EQ("CHOCOLATE=BAR", testJournal.classDataTokens);
54 ASSERT_EQ("20160131T143500Z", testJournal.dateTimeStartData);
55 ASSERT_EQ("DATE-TIME", testJournal.dateTimeStartDataValue);
56 ASSERT_EQ("Europe/Truro", testJournal.dateTimeStartDataTimeZoneID);
57 ASSERT_EQ("PARAMONE=YES;PARAMTWO=NO", testJournal.dateTimeStartDataTokens);
59 // Tests for LAST-MODIFIED.
61 ASSERT_EQ("20160131T143700Z", testJournal.lastModifiedData);
62 ASSERT_EQ("FUTURE=YES", testJournal.lastModifiedTokens);
64 // Tests for ORGANIZER.
66 ASSERT_EQ("mailto:organiser@example.com", testJournal.organiserData);
67 ASSERT_EQ("ExampleOrganiser", testJournal.organiserDataCommonName);
68 ASSERT_EQ("null:nodata", testJournal.organiserDataDirectoryEntry);
69 ASSERT_EQ("mailto:organiser.noreply@example.com", testJournal.organiserDataSentByParam);
70 ASSERT_EQ("kw", testJournal.organiserDataLanguage);
71 ASSERT_EQ("HAPPY=DAYS", testJournal.organiserDataTokens);
73 // Tests for RECURRENCE-ID.
75 ASSERT_EQ("20160131", testJournal.recurranceIDData);
76 ASSERT_EQ("Europe/Truro", testJournal.recurranceIDDataTimeZoneParam);
77 ASSERT_EQ("THISANDFUTURE", testJournal.recurranceIDDataRangeParam);
78 ASSERT_EQ("DATE", testJournal.recurranceIDDataValue);
79 ASSERT_EQ("EXAMPLE=DATA", testJournal.recurranceIDDataTokens);
81 // Tests for SEQUENCE.
83 ASSERT_EQ(7, testJournal.sequenceData);
84 ASSERT_EQ("TEST=YAY", testJournal.sequenceTokens);
88 ASSERT_EQ("2.0;Success", testJournal.statusData);
89 ASSERT_EQ("kw", testJournal.statusLanguage);
90 ASSERT_EQ("FAVOURITE=RICHTEA;NOTLIKE=UNKNOWN", testJournal.statusTokens);
94 ASSERT_EQ("A summary of the journal entry.", testJournal.summaryData);
95 ASSERT_EQ("null:nodata", testJournal.summaryDataAltRep);
96 ASSERT_EQ("kw", testJournal.summaryDataLanguage);
97 ASSERT_EQ("FAVOURITE=TOFU;NOTLIKE=NONE", testJournal.summaryDataTokens);
101 ASSERT_EQ("http://www.example.com/", testJournal.urlData);
102 ASSERT_EQ("EXTERNAL=YES", testJournal.urlDataTokens);
106 ASSERT_EQ("FREQ=DAILY;COUNT=10", testJournal.recurranceRuleData);
107 ASSERT_EQ("TEST=DATA", testJournal.recurranceRuleDataTokens);
109 // Tests for ATTACH. First ATTACH property.
111 std::string attachData;
112 std::string attachDataFormatType;
113 std::string attachDataValue;
114 std::string attachDataEncoding;
115 std::string attachDataTokens;
117 if (testJournal.attachList.begin() != testJournal.attachList.end()){
119 attachData = testJournal.attachList[0];
123 if (testJournal.attachListFormatType.begin() != testJournal.attachListFormatType.end()){
125 attachDataFormatType = testJournal.attachListFormatType[0];
129 ASSERT_EQ("http://www.example.com/", attachData);
130 ASSERT_EQ("application/internet-shortcut", attachDataFormatType);
132 // Second ATTACH property.
135 attachDataFormatType.clear();
136 attachDataValue.clear();
137 attachDataEncoding.clear();
139 if (testJournal.attachList.size() > 1){
141 attachData = testJournal.attachList[1];
145 if (testJournal.attachListFormatType.size() > 1){
147 attachDataFormatType = testJournal.attachListFormatType[1];
151 ASSERT_EQ("http://www.example.com/page2.html", attachData);
152 ASSERT_EQ("application/internet-shortcut", attachDataFormatType);
154 // Third ATTACH property.
157 attachDataFormatType.clear();
158 attachDataValue.clear();
159 attachDataEncoding.clear();
160 attachDataTokens.clear();
162 if (testJournal.attachList.size() > 2){
164 attachData = testJournal.attachList[2];
168 if (testJournal.attachListFormatType.size() > 2){
170 attachDataFormatType = testJournal.attachListFormatType[2];
174 if (testJournal.attachListValue.size() > 2){
176 attachDataValue = testJournal.attachListValue[2];
180 if (testJournal.attachListFormatType.size() > 2){
182 attachDataEncoding = testJournal.attachListEncoding[2];
186 if (testJournal.attachListTokens.size() > 2){
188 attachDataTokens = testJournal.attachListTokens[2];
192 ASSERT_EQ("VGhpcyBpcyBhbiBleGFtcGxlIGZpbGU=", attachData);
193 ASSERT_EQ("text/plain", attachDataFormatType);
194 ASSERT_EQ("BASE64", attachDataEncoding);
195 ASSERT_EQ("BINARY", attachDataValue);
196 ASSERT_EQ("STUPID=EXAMPLE", attachDataTokens);
198 // Tests for ATTENDEE. First ATTENDEE property.
200 std::string attendeeDataMember;
201 std::string attendeeDataDelegatedFrom;
202 std::string attendeeDataDelegatedTo;
203 std::string attendeeDataRole;
204 std::string attendeeDataRSVP;
205 std::string attendeeDataDirectoryEntry;
206 std::string attendeeDataSentBy;
207 std::string attendeeDataCommonName;
208 std::string attendeeDataCalendarUserType;
209 std::string attendeeDataParticipationStatus;
210 std::string attendeeDataLanguage;
211 std::string attendeeDataTokens;
212 std::string attendeeData;
214 if (testJournal.attendeeList.begin() != testJournal.attendeeList.end()){
216 attendeeData = testJournal.attendeeList[0];
220 ASSERT_EQ("Attendee One", attendeeData);
222 // Second ATTENDEE property.
224 attendeeData.clear();
226 if (testJournal.attendeeList.size() > 1){
228 attendeeData = testJournal.attendeeList[1];
232 if (testJournal.attendeeList.size() > 1){
234 attendeeDataDelegatedFrom = testJournal.attendeeListDelegatedFrom[1];
238 if (testJournal.attendeeList.size() > 1){
240 attendeeDataDelegatedTo = testJournal.attendeeListDelegatedTo[1];
244 if (testJournal.attendeeList.size() > 1){
246 attendeeDataRole = testJournal.attendeeListRole[1];
250 if (testJournal.attendeeList.size() > 1){
252 attendeeDataRSVP = testJournal.attendeeListRSVP[1];
256 ASSERT_EQ("Attendee Two", attendeeData);
257 ASSERT_EQ("mailto:delegated.from@example.com", attendeeDataDelegatedFrom);
258 ASSERT_EQ("mailto:delegated.to@example.com", attendeeDataDelegatedTo);
259 ASSERT_EQ("CHAIR", attendeeDataRole);
260 ASSERT_EQ("TRUE", attendeeDataRSVP);
262 // Third ATTENDEE property.
264 attendeeData.clear();
266 if (testJournal.attendeeList.size() > 2){
268 attendeeData = testJournal.attendeeList[2];
272 if (testJournal.attendeeList.size() > 2){
274 attendeeDataDirectoryEntry = testJournal.attendeeListDirectoryEntry[2];
278 if (testJournal.attendeeList.size() > 2){
280 attendeeDataSentBy = testJournal.attendeeListSentBy[2];
284 if (testJournal.attendeeList.size() > 2){
286 attendeeDataCommonName = testJournal.attendeeListCommonName[2];
290 if (testJournal.attendeeList.size() > 2){
292 attendeeDataCalendarUserType = testJournal.attendeeListCalendarUserType[2];
296 if (testJournal.attendeeList.size() > 2){
298 attendeeDataParticipationStatus = testJournal.attendeeListParticipationStatus[2];
302 if (testJournal.attendeeList.size() > 2){
304 attendeeDataLanguage = testJournal.attendeeListLanguage[2];
308 if (testJournal.attendeeList.size() > 2){
310 attendeeDataTokens = testJournal.attendeeListTokens[2];
314 ASSERT_EQ("Attendee Three", attendeeData);
315 ASSERT_EQ("null:nodata", attendeeDataDirectoryEntry);
316 ASSERT_EQ("mailto:sent.by@example.com", attendeeDataSentBy);
317 ASSERT_EQ("Attendee The Third", attendeeDataCommonName);
318 ASSERT_EQ("INDIVIDUAL", attendeeDataCalendarUserType);
319 ASSERT_EQ("ACCEPTED", attendeeDataParticipationStatus);
320 ASSERT_EQ("kw", attendeeDataLanguage);
321 ASSERT_EQ("EXAMPLE=DATA", attendeeDataTokens);
323 // Get the first CATEGORIES.
325 std::string categoryData;
327 if (testJournal.categoriesList.begin() != testJournal.categoriesList.end()){
329 categoryData = testJournal.categoriesList[0];
333 ASSERT_EQ("CATEGORY ONE, CATEGORY TWO", categoryData);
335 categoryData.clear();
337 std::string categoryLanguage;
339 // Get the second CATEGORIES.
341 if (testJournal.categoriesList.size() > 1){
343 categoryData = testJournal.categoriesList[1];
347 if (testJournal.categoriesList.size() > 1){
349 categoryLanguage = testJournal.categoriesListLanguage[1];
353 ASSERT_EQ("CATEGORY THREE, CATEGORY FOUR", categoryData);
354 ASSERT_EQ("en", categoryLanguage);
356 categoryData.clear();
357 categoryLanguage.clear();
359 // Get the third CATEGORIES.
361 std::string categoryTokens;
363 if (testJournal.categoriesList.size() > 2){
365 categoryData = testJournal.categoriesList[2];
369 if (testJournal.categoriesList.size() > 2){
371 categoryLanguage = testJournal.categoriesListLanguage[2];
375 if (testJournal.categoriesList.size() > 2){
377 categoryTokens = testJournal.categoriesListTokens[2];
381 ASSERT_EQ("CATEGORY FIVE, CATEGORY SIX, CATEGORY SEVEN", categoryData);
382 ASSERT_EQ("en-GB", categoryLanguage);
383 ASSERT_EQ("SAMPLE=TOKEN", categoryTokens);
385 // Get the first COMMENT.
387 std::string commentData;
389 if (testJournal.commentList.begin() != testJournal.commentList.end()){
391 commentData = testJournal.commentList[0];
395 ASSERT_EQ("This is the first comment.", commentData);
397 // Get the second COMMENT.
401 std::string commentDataAltRep;
402 std::string commentDataLanguage;
404 if (testJournal.commentList.size() > 1){
406 commentData = testJournal.commentList[1];
410 if (testJournal.commentList.size() > 1){
412 commentDataAltRep = testJournal.commentListAltRep[1];
416 if (testJournal.commentList.size() > 1){
418 commentDataLanguage = testJournal.commentListLanguage[1];
422 ASSERT_EQ("This is the second comment.", commentData);
423 ASSERT_EQ("null:nodata", commentDataAltRep);
424 ASSERT_EQ("en", commentDataLanguage);
426 // Get the third COMMENT.
430 std::string commentDataTokens;
432 if (testJournal.commentList.size() > 2){
434 commentData = testJournal.commentList[2];
438 if (testJournal.commentList.size() > 2){
440 commentDataTokens = testJournal.commentListTokens[2];
444 ASSERT_EQ("This is the third comment.", commentData);
445 ASSERT_EQ("ZEBRAS=YES", commentDataTokens);
447 // Get the first CONTACT.
449 std::string contactData;
451 if (testJournal.contactList.begin() != testJournal.contactList.end()){
453 contactData = testJournal.contactList[0];
457 ASSERT_EQ("First Contact", contactData);
459 // Get the second CONTACT.
463 std::string contactDataAltRep;
464 std::string contactDataLanguage;
466 if (testJournal.contactList.size() > 1){
468 contactData = testJournal.contactList[1];
472 if (testJournal.contactList.size() > 1){
474 contactDataAltRep = testJournal.contactListAltRep[1];
478 if (testJournal.contactList.size() > 1){
480 contactDataLanguage = testJournal.contactListLanguage[1];
484 ASSERT_EQ("Second Contact", contactData);
485 ASSERT_EQ("null:nodata", contactDataAltRep);
486 ASSERT_EQ("en-GB", contactDataLanguage);
488 // Get the third CONTACT.
492 std::string contactDataTokens;
494 if (testJournal.contactList.size() > 2){
496 contactData = testJournal.contactList[2];
500 if (testJournal.contactList.size() > 2){
502 contactDataTokens = testJournal.contactListTokens[2];
506 ASSERT_EQ("Third Contact", contactData);
507 ASSERT_EQ("ZEBRAS=NO", contactDataTokens);
509 // Get the first DESCRIPTION.
511 std::string descriptionData;
513 if (testJournal.descriptionList.begin() != testJournal.descriptionList.end()){
515 descriptionData = testJournal.descriptionList[0];
519 ASSERT_EQ("First Journal Entry Description", descriptionData);
521 // Get the second DESCRIPTION.
523 descriptionData.clear();
525 std::string descriptionAltRep;
526 std::string descriptionLanguage;
528 if (testJournal.descriptionList.size() > 1){
530 descriptionData = testJournal.descriptionList[1];
534 if (testJournal.descriptionList.size() > 1){
536 descriptionAltRep = testJournal.descriptionListAltRep[1];
540 if (testJournal.descriptionList.size() > 1){
542 descriptionLanguage = testJournal.descriptionListLanguage[1];
546 ASSERT_EQ("This is the second journal description.", descriptionData);
547 ASSERT_EQ("null:nodata", descriptionAltRep);
548 ASSERT_EQ("en-GB", descriptionLanguage);
550 // Get the third DESCRIPTION.
552 descriptionData.clear();
554 std::string descriptionDataTokens;
556 if (testJournal.descriptionList.size() > 2){
558 descriptionData = testJournal.descriptionList[2];
562 if (testJournal.descriptionList.size() > 2){
564 descriptionDataTokens = testJournal.descriptionListTokens[2];
568 ASSERT_EQ("This is the third journal description.", descriptionData);
569 ASSERT_EQ("ZEBRAS=NO", descriptionDataTokens);
571 // Get the first EXDATE.
573 std::string excludeDate;
575 if (testJournal.excludeDateData.begin() != testJournal.excludeDateData.end()){
577 excludeDate = testJournal.excludeDateData[0];
581 ASSERT_EQ("20160125T120000Z", excludeDate);
583 // Get the second EXDATE.
587 std::string excludeDataTimeZoneParam;
588 std::string excludeDataValue;
590 if (testJournal.contactList.size() > 1){
592 excludeDate = testJournal.excludeDateData[1];
596 if (testJournal.contactList.size() > 1){
598 excludeDataTimeZoneParam = testJournal.excludeDateDataTimeZoneParam[1];
602 if (testJournal.contactList.size() > 1){
604 excludeDataValue = testJournal.excludeDateDataValue[1];
608 ASSERT_EQ("20160125T130000Z", excludeDate);
609 ASSERT_EQ("DATE-TIME", excludeDataValue);
610 ASSERT_EQ("Europe/Truro", excludeDataTimeZoneParam);
612 // Get the third EXDATE.
616 std::string excludeDataTokens;
618 if (testJournal.contactList.size() > 2){
620 excludeDate = testJournal.excludeDateData[2];
624 if (testJournal.contactList.size() > 2){
626 excludeDataTokens = testJournal.excludeDateDataTokens[2];
630 ASSERT_EQ("20160125T133000Z", excludeDate);
631 ASSERT_EQ("ZOOP=ZIPPO", excludeDataTokens);
633 // Get the first RELATED-TO.
635 std::string relatedTo;
637 if (testJournal.relatedToData.begin() != testJournal.relatedToData.end()){
639 relatedTo = testJournal.relatedToData[0];
643 ASSERT_EQ("person.1@example.com", relatedTo);
645 // Get the second RELATED-TO.
649 std::string relatedToType;
651 if (testJournal.relatedToData.size() > 1){
653 relatedTo = testJournal.relatedToData[1];
657 if (testJournal.relatedToData.size() > 1){
659 relatedToType = testJournal.relatedToDataRelationType[1];
663 ASSERT_EQ("person.2@example.com", relatedTo);
664 ASSERT_EQ("PARENT", relatedToType);
666 // Get the third RELATED-TO.
670 std::string relatedToTokens;
672 if (testJournal.relatedToData.size() > 2){
674 relatedTo = testJournal.relatedToData[2];
678 if (testJournal.relatedToData.size() > 2){
680 relatedToTokens = testJournal.relatedToDataTokens[2];
684 ASSERT_EQ("person.3@example.com", relatedTo);
685 ASSERT_EQ("SCHOOL=MEETING", relatedToTokens);
687 // Get the first RDATE.
689 std::string recurrenceDate;
691 if (testJournal.recurranceDateData.begin() != testJournal.recurranceDateData.end()){
693 recurrenceDate = testJournal.recurranceDateData[0];
697 ASSERT_EQ("20160120", recurrenceDate);
699 // Get the second RDATE.
701 recurrenceDate.clear();
703 std::string recurrenceDateTimeZoneParam;
704 std::string recurrenceDateValue;
706 if (testJournal.recurranceDateData.size() > 1){
708 recurrenceDate = testJournal.recurranceDateData[1];
712 if (testJournal.recurranceDateData.size() > 1){
714 recurrenceDateTimeZoneParam = testJournal.recurranceDateDataTimeZoneParam[1];
718 if (testJournal.recurranceDateData.size() > 1){
720 recurrenceDateValue = testJournal.recurranceDateDataValue[1];
724 ASSERT_EQ("20160121", recurrenceDate);
725 ASSERT_EQ("DATE", recurrenceDateValue);
726 ASSERT_EQ("Europe/Truro", recurrenceDateTimeZoneParam);
728 // Get the third RDATE.
730 recurrenceDate.clear();
732 std::string RecurrenceTokens;
734 if (testJournal.recurranceDateData.size() > 2){
736 recurrenceDate = testJournal.recurranceDateData[2];
740 if (testJournal.recurranceDateData.size() > 2){
742 RecurrenceTokens = testJournal.recurranceDateDataTokens[2];
746 ASSERT_EQ("20160520", recurrenceDate);
747 ASSERT_EQ("ZILCH=DATA", RecurrenceTokens);
749 // Get the first REQUEST-STATUS.
751 std::string requestStatus;
753 if (testJournal.requestStatusData.begin() != testJournal.requestStatusData.end()){
755 requestStatus = testJournal.requestStatusData[0];
759 ASSERT_EQ("2.0;Success", requestStatus);
761 // Get the second REQUEST-STATUS.
763 requestStatus.clear();
765 std::string requestLanguage;
767 if (testJournal.contactList.size() > 1){
769 requestStatus = testJournal.requestStatusData[1];
773 if (testJournal.contactList.size() > 1){
775 requestLanguage = testJournal.requestStatusLanguage[1];
779 ASSERT_EQ("3.42;Really big irrecoverable error caused by the user", requestStatus);
780 ASSERT_EQ("en", requestLanguage);
782 // Get the third REQUEST-STATUS.
784 requestStatus.clear();
786 std::string requestTokens;
788 if (testJournal.contactList.size() > 2){
790 requestStatus = testJournal.requestStatusData[2];
794 if (testJournal.contactList.size() > 2){
796 requestTokens = testJournal.requestStatusTokens[2];
800 ASSERT_EQ("3.7;Invalid calendar user", requestStatus);
801 ASSERT_EQ("USER=MISSING", requestTokens);
803 // Get the first X-EXAMPLE1 token.
805 std::string xTokenName;
806 std::string xTokenData;
808 if (testJournal.xTokensData.size() != 0 ){
810 xTokenData = testJournal.xTokensData[0];
814 if (testJournal.xTokensData.size() != 0){
816 xTokenName = testJournal.xTokensDataTokens[0];
820 ASSERT_EQ("Moo", xTokenData);
821 ASSERT_EQ("X-EXAMPLE1", xTokenName);
823 // Get the second X-EXAMPLE1 token.
828 if (testJournal.xTokensData.size() > 1){
830 xTokenData = testJournal.xTokensData[1];
834 if (testJournal.xTokensData.size() > 1){
836 xTokenName = testJournal.xTokensDataTokens[1];
840 ASSERT_EQ("Meep", xTokenData);
841 ASSERT_EQ("X-EXAMPLE1;ANIMAL=NOPE", xTokenName);
843 // Get the third X-EXAMPLE1 token.
848 if (testJournal.xTokensData.size() > 2){
850 xTokenData = testJournal.xTokensData[2];
854 if (testJournal.xTokensData.size() > 2){
856 xTokenName = testJournal.xTokensDataTokens[2];
860 ASSERT_EQ("Meow", xTokenData);
861 ASSERT_EQ("X-EXAMPLE1;ANIMAL=CAT", xTokenName);
863 // Get the first X-EXAMPLE2 token.
868 if (testJournal.xTokensData.size() > 3){
870 xTokenData = testJournal.xTokensData[3];
874 if (testJournal.xTokensData.size() > 3){
876 xTokenName = testJournal.xTokensDataTokens[3];
880 ASSERT_EQ("Dish", xTokenData);
881 ASSERT_EQ("X-EXAMPLE2", xTokenName);
883 // Get the second X-EXAMPLE2 token.
888 if (testJournal.xTokensData.size() > 4){
890 xTokenData = testJournal.xTokensData[4];
894 if (testJournal.xTokensData.size() > 4){
896 xTokenName = testJournal.xTokensDataTokens[4];
900 ASSERT_EQ("Fork", xTokenData);
901 ASSERT_EQ("X-EXAMPLE2;OBJECT=KITCHEN", xTokenName);
903 // Get the third X-EXAMPLE2 token.
908 if (testJournal.xTokensData.size() > 5){
910 xTokenData = testJournal.xTokensData[5];
914 if (testJournal.xTokensData.size() > 5){
916 xTokenName = testJournal.xTokensDataTokens[5];
920 ASSERT_EQ("Table", xTokenData);
921 ASSERT_EQ("X-EXAMPLE2;OBJECT=LIVINGROOM", xTokenName);
923 // Get the X-STATUS token.
928 if (testJournal.xTokensData.size() > 6){
930 xTokenData = testJournal.xTokensData[6];
934 if (testJournal.xTokensData.size() > 6){
936 xTokenName = testJournal.xTokensDataTokens[6];
940 ASSERT_EQ("Idle", xTokenData);
941 ASSERT_EQ("X-STATUS;HOLIDAY=YES", xTokenName);
943 // Get the X-TRANSPORT token.
948 if (testJournal.xTokensData.size() > 7){
950 xTokenData = testJournal.xTokensData[7];
954 if (testJournal.xTokensData.size() > 7){
956 xTokenName = testJournal.xTokensDataTokens[7];
960 ASSERT_EQ("Private Hire", xTokenData);
961 ASSERT_EQ("X-TRANSPORT;PUBLIC=NO", xTokenName);
963 // Get the X-PHANTOM-STATUS token.
968 if (testJournal.xTokensData.size() > 8){
970 xTokenData = testJournal.xTokensData[8];
974 if (testJournal.xTokensData.size() > 8){
976 xTokenName = testJournal.xTokensDataTokens[8];
980 ASSERT_EQ("None", xTokenData);
981 ASSERT_EQ("X-PHANTOM-STATUS;HELP=NONE", xTokenName);