Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added unit tests for UID, CONTACT and DTSTART in iCalendarJournal/ObjectDataTests.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 31 Jan 2016 18:05:18 +0000 (18:05 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 31 Jan 2016 18:05:18 +0000 (18:05 +0000)
source/tests/xestiacalendar_icalfreebusyload.h

index e0b63aa..76bd923 100644 (file)
@@ -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
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