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

index b93c03e..fae9e65 100644 (file)
@@ -568,4 +568,66 @@ TEST(iCalendarJournal, ObjectDataTests){
        ASSERT_EQ("This is the third journal description.", DescriptionData);
        ASSERT_EQ("ZEBRAS=NO", DescriptionDataTokens);
        
+       // Get the first EXDATE.
+       
+       std::string ExcludeDate;
+       
+       if (TestJournal.ExcludeDateData.begin() != TestJournal.ExcludeDateData.end()){
+               
+               ExcludeDate = TestJournal.ExcludeDateData[0];
+               
+       }
+       
+       ASSERT_EQ("20160125T120000Z", ExcludeDate);
+       
+       // Get the second EXDATE.
+
+       ExcludeDate.clear();
+       
+       std::string ExcludeDataTimeZoneParam;
+       std::string ExcludeDataValue;
+       
+       if (TestJournal.ContactList.size() > 1){
+               
+               ExcludeDate = TestJournal.ExcludeDateData[1];
+               
+       }
+       
+       if (TestJournal.ContactList.size() > 1){
+               
+               ExcludeDataTimeZoneParam = TestJournal.ExcludeDateDataTimeZoneParam[1];
+               
+       }
+       
+       if (TestJournal.ContactList.size() > 1){
+               
+               ExcludeDataValue = TestJournal.ExcludeDateDataValue[1];
+               
+       }
+       
+       ASSERT_EQ("20160125T130000Z", ExcludeDate);
+       ASSERT_EQ("DATE-TIME", ExcludeDataValue);
+       ASSERT_EQ("Europe/Truro", ExcludeDataTimeZoneParam);
+       
+       // Get the third EXDATE.
+       
+       ExcludeDate.clear();
+       
+       std::string ExcludeDataTokens;
+       
+       if (TestJournal.ContactList.size() > 2){
+               
+               ExcludeDate = TestJournal.ExcludeDateData[2];
+               
+       }
+       
+       if (TestJournal.ContactList.size() > 2){
+               
+               ExcludeDataTokens = TestJournal.ExcludeDateDataTokens[2];
+               
+       }
+       
+       ASSERT_EQ("20160125T133000Z", ExcludeDate);
+       ASSERT_EQ("ZOOP=ZIPPO", ExcludeDataTokens);
+       
 }
\ 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