X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;ds=sidebyside;f=source%2Ftests%2Fxestiacalendar_icalfreebusyload.h;h=76bd92316741a69adeb4ab9c598ef5f55df089aa;hb=285ca29f0d2706bd83fac56a7b8be66a56e6079f;hp=e0b63aa43bfb41f4dcdc3aaa36ed875cacb11a44;hpb=85a356333d6ca8a5f63bc3776cfbabb9507b958f;p=xestiacalendar%2F.git diff --git a/source/tests/xestiacalendar_icalfreebusyload.h b/source/tests/xestiacalendar_icalfreebusyload.h index e0b63aa..76bd923 100644 --- a/source/tests/xestiacalendar_icalfreebusyload.h +++ b/source/tests/xestiacalendar_icalfreebusyload.h @@ -39,4 +39,52 @@ TEST(iCalendarFreeBusy, ObjectDataTests){ ASSERT_EQ("20160131T173000Z", TestFreeBusy.DateTimeStampData); ASSERT_EQ("OTHER=PARAM", TestFreeBusy.DateTimeStampTokens); + // Tests for UID. + + ASSERT_EQ("b3a16392-ad86-4061-be53-c215af2306ff", TestFreeBusy.UniqueID); + ASSERT_EQ("UNIQUEPARAM=CERTAINLY;OKAY=MAYBENOT", TestFreeBusy.UniqueIDTokens); + + // Tests for CONTACT. + + std::string ContactData; + std::string ContactDataAltRep; + std::string ContactDataLanguage; + std::string ContactDataTokens; + + if (TestFreeBusy.ContactList.size() > 0){ + + ContactData = TestFreeBusy.ContactList[0]; + + } + + if (TestFreeBusy.ContactList.size() > 0){ + + ContactDataAltRep = TestFreeBusy.ContactListAltRep[0]; + + } + + if (TestFreeBusy.ContactList.size() > 0){ + + ContactDataLanguage = TestFreeBusy.ContactListLanguage[0]; + + } + + if (TestFreeBusy.ContactList.size() > 0){ + + ContactDataTokens = TestFreeBusy.ContactListTokens[0]; + + } + + ASSERT_EQ("Contact Person", ContactData); + ASSERT_EQ("null:nodata", ContactDataAltRep); + ASSERT_EQ("en-GB", ContactDataLanguage); + ASSERT_EQ("EXAMPLE=TOKEN", ContactDataTokens); + + // Tests for DTSTART. + + ASSERT_EQ("20160131T103000Z", TestFreeBusy.DateTimeStartData); + ASSERT_EQ("DATE-TIME", TestFreeBusy.DateTimeStartDataValue); + ASSERT_EQ("Europe/Truro", TestFreeBusy.DateTimeStartDataTimeZoneID); + ASSERT_EQ("PARAMONE=YES;PARAMTWO=NO", TestFreeBusy.DateTimeStartDataTokens); + } \ No newline at end of file