Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added unit tests for LOCATION in iCalendarJournal/ObjectDataTests.
[xestiacalendar/.git] / source / tests / xestiacalendar_icaljournalload.h
index 9c06acc..53a9849 100644 (file)
@@ -30,13 +30,42 @@ TEST(iCalendarJournal, BasicTests){
 
 TEST(iCalendarJournal, ObjectDataTests){
        
-       CalendarEventObject TestJournal;
-       ASSERT_EQ(CALENDAROBJECTLOAD_OK, TestJournal.LoadFile("iCalendarEvent-Load2.vcf"));
+       CalendarJournalObject TestJournal;
+       ASSERT_EQ(CALENDAROBJECTLOAD_OK, TestJournal.LoadFile("iCalendarJournal-Load2.vcf"));
        ASSERT_EQ(CALENDAROBJECTVALID_OK, TestJournal.ValidBaseObject());
        
        // Tests for DTSTAMP.
        
-       ASSERT_EQ("20160122T124100Z", TestJournal.DateTimeStampData);
+       ASSERT_EQ("20160131T141500Z", TestJournal.DateTimeStampData);
        ASSERT_EQ("OTHER=PARAM", TestJournal.DateTimeStampTokens);
        
+       // Tests for UID.
+       
+       ASSERT_EQ("b3a16392-ad86-4061-be53-c215af2306c1", TestJournal.UniqueID);
+       ASSERT_EQ("UNIQUEPARAM=CERTAINLY;OKAY=MAYBENOT", TestJournal.UniqueIDTokens);
+       
+       // Tests for CLASS.
+       
+       ASSERT_EQ("PUBLIC", TestJournal.ClassData);
+       ASSERT_EQ("CHOCOLATE=BAR", TestJournal.ClassDataTokens);
+       
+       // Tests for DTSTART.
+       
+       ASSERT_EQ("20160131T143500Z", TestJournal.DateTimeStartData);
+       ASSERT_EQ("DATE-TIME", TestJournal.DateTimeStartDataValue);
+       ASSERT_EQ("Europe/Truro", TestJournal.DateTimeStartDataTimeZoneID);
+       ASSERT_EQ("PARAMONE=YES;PARAMTWO=NO", TestJournal.DateTimeStartDataTokens);
+       
+       // Tests for LAST-MODIFIED.
+       
+       ASSERT_EQ("20160131T143700Z", TestJournal.LastModifiedData);
+       ASSERT_EQ("FUTURE=YES", TestJournal.LastModifiedTokens);
+       
+       // Tests for LOCATION.
+
+       ASSERT_EQ("The Middle Floors, Truro", TestJournal.LocationData);
+       ASSERT_EQ("null:nodata", TestJournal.LocationDataAltRep);
+       ASSERT_EQ("kw", TestJournal.LocationDataLanguage);
+       ASSERT_EQ("EXACT=NO", TestJournal.LocationDataTokens);
+       
 }
\ 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