Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added unit tests for RDATE in iCalendarJournal/ObjectDataTests.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 31 Jan 2016 15:47:54 +0000 (15:47 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 31 Jan 2016 15:47:54 +0000 (15:47 +0000)
source/tests/xestiacalendar_icaljournalload.h

index 708fd72..dd4f64c 100644 (file)
@@ -684,4 +684,67 @@ TEST(iCalendarJournal, ObjectDataTests){
        ASSERT_EQ("person.3@example.com", RelatedTo);
        ASSERT_EQ("SCHOOL=MEETING", RelatedToTokens);
        
+       // Get the first RDATE.
+
+       std::string RecurrenceDate;
+       
+       if (TestJournal.RecurranceDateData.begin() != TestJournal.RecurranceDateData.end()){
+               
+               RecurrenceDate = TestJournal.RecurranceDateData[0];
+               
+       }
+       
+       ASSERT_EQ("20160120", RecurrenceDate);
+       
+       // Get the second RDATE.
+       
+       RecurrenceDate.clear();
+       
+       std::string RecurrenceDateTimeZoneParam;
+       std::string RecurrenceDateValue;
+       
+       if (TestJournal.RecurranceDateData.size() > 1){
+               
+               RecurrenceDate = TestJournal.RecurranceDateData[1];
+               
+       }
+       
+       if (TestJournal.RecurranceDateData.size() > 1){
+               
+               RecurrenceDateTimeZoneParam = TestJournal.RecurranceDateDataTimeZoneParam[1];
+               
+       }
+       
+       if (TestJournal.RecurranceDateData.size() > 1){
+               
+               RecurrenceDateValue = TestJournal.RecurranceDateDataValue[1];
+               
+       }
+       
+       ASSERT_EQ("20160121", RecurrenceDate);
+       ASSERT_EQ("DATE", RecurrenceDateValue);
+       ASSERT_EQ("Europe/Truro", RecurrenceDateTimeZoneParam);
+       
+       // Get the third RDATE.
+       
+       RecurrenceDate.clear();
+       
+       std::string RecurrenceTokens;
+       
+       if (TestJournal.RecurranceDateData.size() > 2){
+               
+               RecurrenceDate = TestJournal.RecurranceDateData[2];
+               
+       }
+       
+       if (TestJournal.RecurranceDateData.size() > 2){
+               
+               RecurrenceTokens = TestJournal.RecurranceDateDataTokens[2];
+               
+       }
+       
+       ASSERT_EQ("20160520", RecurrenceDate);
+       ASSERT_EQ("ZILCH=DATA", RecurrenceTokens);
+
+       
 }
\ 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