Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added RecurrenceIDDataRangeParam in CalendarObject.
[xestiacalendar/.git] / source / tests / xestiacalendar_icaleventload.h
index 87f7bd5..baff32a 100644 (file)
@@ -78,5 +78,100 @@ TEST(iCalendarEvent, ObjectDataTests){
 
        ASSERT_EQ("20160123T081100Z", TestEvent.DateTimeCreatedData);
        ASSERT_EQ("CARAMEL=PLEASE", TestEvent.DateTimeCreatedTokens);
+       
+       // Tests for DESCRIPTION.
+       
+       std::string DescriptionData;
+       std::string DescriptionAltRep;
+       std::string DescriptionLanguage;
+       std::string DescriptionTokens;
+       
+       if (TestEvent.DescriptionList.begin() != TestEvent.DescriptionList.end()){
+               DescriptionData = TestEvent.DescriptionList[0];
+       }
+
+       if (TestEvent.DescriptionListAltRep.begin() != TestEvent.DescriptionListAltRep.end()){
+               DescriptionAltRep = TestEvent.DescriptionListAltRep[0];
+       }
+
+       if (TestEvent.DescriptionListAltRep.begin() != TestEvent.DescriptionListAltRep.end()){
+               DescriptionLanguage = TestEvent.DescriptionListLanguage[0];
+       }
+
+       if (TestEvent.DescriptionListTokens.begin() != TestEvent.DescriptionListTokens.end()){
+               DescriptionTokens = TestEvent.DescriptionListTokens[0];
+       }
+       
+       ASSERT_EQ("This is a description of the event.", DescriptionData);
+       ASSERT_EQ("null:nodata", DescriptionAltRep);
+       ASSERT_EQ("kw", DescriptionLanguage);
+       ASSERT_EQ("EXAMPLE=TOKEN;MOREDATA=YES", DescriptionTokens);
+
+       // Tests for GEO.
+       
+       ASSERT_EQ("5.0;5.0", TestEvent.GeographicData);
+       ASSERT_EQ("EXAMPLE=MEEP", TestEvent.GeographicTokens);
+       
+       // Tests for LAST-MODIFIED.
+       
+       ASSERT_EQ("20160124T093000Z", TestEvent.LastModifiedData);
+       ASSERT_EQ("FUTURE=ODD", TestEvent.LastModifiedTokens);
+
+       // Tests for LOCATION.
+
+       ASSERT_EQ("The Basement, Truro", TestEvent.LocationData);
+       ASSERT_EQ("null:nodata", TestEvent.LocationDataAltRep);
+       ASSERT_EQ("kw", TestEvent.LocationDataLanguage);
+       ASSERT_EQ("EXACT=NO", TestEvent.LocationDataTokens);
+       
+       // Tests for ORGANIZER.
+       
+       ASSERT_EQ("mailto:organiser@example.com", TestEvent.OrganiserData);
+       ASSERT_EQ("ExampleOrganiser", TestEvent.OrganiserDataCommonName);
+       ASSERT_EQ("null:nodata", TestEvent.OrganiserDataDirectoryEntry);
+       ASSERT_EQ("mailto:organiser.noreply@example.com", TestEvent.OrganiserDataSentByParam);
+       ASSERT_EQ("kw", TestEvent.OrganiserDataLanguage);
+       ASSERT_EQ("HAPPY=DAYS", TestEvent.OrganiserDataTokens);
+       
+       // Tests for PRIORITY.
+       
+       ASSERT_EQ(5, TestEvent.PriorityData);
+       ASSERT_EQ("STATUS=DEFAULT", TestEvent.PriorityTokens);
+
+       // Tests for SEQUENCE.
+       
+       ASSERT_EQ(3, TestEvent.SequenceData);
+       ASSERT_EQ("TEST=YAY", TestEvent.SequenceTokens);
+
+       // Tests for STATUS.
+       
+       ASSERT_EQ("2.0;Success", TestEvent.RequestStatusData);
+       ASSERT_EQ("kw", TestEvent.RequestStatusLanguage);
+       ASSERT_EQ("FAVOURITE=RICHTEA;NOTLIKE=UNKNOWN", TestEvent.RequestStatusTokens);
+
+       // Tests for SUMMARY.
+       
+       ASSERT_EQ("A summary of the event.", TestEvent.SummaryData);
+       ASSERT_EQ("null:nodata", TestEvent.SummaryDataAltRep);
+       ASSERT_EQ("kw", TestEvent.SummaryDataLanguage);
+       ASSERT_EQ("FAVOURITE=TOFU;NOTLIKE=NONE", TestEvent.SummaryDataTokens);
+
+       // Tests for TRANSP.
+       
+       ASSERT_EQ("TRANSPARENT", TestEvent.TimeTransparencyData);
+       ASSERT_EQ("OPAQUE=NOTYET", TestEvent.TimeTransparencyDataTokens);
+
+       // Tests for URL.
+
+       ASSERT_EQ("http://www.example.com/", TestEvent.URLData);
+       ASSERT_EQ("EXTERNAL=YES", TestEvent.URLDataTokens);
+       
+       // Tests for RECURRENCE-ID.
+       
+       ASSERT_EQ("20160124", TestEvent.RecurranceIDData);
+       ASSERT_EQ("Europe/Truro", TestEvent.RecurranceIDDataTimeZoneParam);
+       ASSERT_EQ("THISANDFUTURE", TestEvent.RecurranceIDDataRangeParam);
+       ASSERT_EQ("DATE", TestEvent.RecurranceIDDataValue);
+       ASSERT_EQ("EXAMPLE=DATA", TestEvent.RecurranceIDDataTokens);
 
 }
\ 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