Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added unit tests for ATTENDEE in iCalendarFreeBusy/ObjectDataTests.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Tue, 2 Feb 2016 23:07:24 +0000 (23:07 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Tue, 2 Feb 2016 23:07:24 +0000 (23:07 +0000)
source/tests/xestiacalendar_icalfreebusyload.h

index ced2205..aed374c 100644 (file)
@@ -295,4 +295,66 @@ TEST(iCalendarFreeBusy, ObjectDataTests){
        ASSERT_EQ("This is the third comment.", CommentData);
        ASSERT_EQ("ZEBRAS=YES", CommentDataTokens);
        
+       // Get the first FREEBUSY.
+       
+       std::string FreeBusyData;
+       
+       if (TestFreeBusy.FreeBusyList.begin() != TestFreeBusy.FreeBusyList.end()){
+               
+               FreeBusyData = TestFreeBusy.FreeBusyList[0];
+               
+       }
+       
+       ASSERT_EQ("20160202T210000Z/PT1H", FreeBusyData);
+       
+       // Get the second FREEBUSY.
+       
+       FreeBusyData.clear();
+       
+       std::string FreeBusyType;
+       
+       if (TestFreeBusy.FreeBusyList.size() > 1){
+               
+               FreeBusyData = TestFreeBusy.FreeBusyList[1];
+               
+       }
+       
+       if (TestFreeBusy.FreeBusyListType.size() > 1){
+               
+               FreeBusyType = TestFreeBusy.FreeBusyListType[1];
+               
+       }
+
+       ASSERT_EQ("FREE", FreeBusyType);        
+       ASSERT_EQ("20160202T220000Z/PT1H", FreeBusyData);       
+       
+       // Get the third FREEBUSY.
+       
+       FreeBusyData.clear();
+       FreeBusyType.clear();
+       
+       std::string FreeBusyTokens;
+       
+       if (TestFreeBusy.FreeBusyList.size() > 2){
+               
+               FreeBusyData = TestFreeBusy.FreeBusyList[2];
+               
+       }
+       
+       if (TestFreeBusy.FreeBusyListType.size() > 2){
+               
+               FreeBusyType = TestFreeBusy.FreeBusyListType[2];
+               
+       }
+       
+       if (TestFreeBusy.FreeBusyListTokens.size() > 2){
+               
+               FreeBusyTokens = TestFreeBusy.FreeBusyListTokens[2];
+               
+       }
+
+       ASSERT_EQ("BUSY-UNAVAILABLE", FreeBusyType);    
+       ASSERT_EQ("20160202T230000Z/PT9H", FreeBusyData);
+       ASSERT_EQ("RESULT=ARGH;TEST=YES", FreeBusyTokens);
+       
 }
\ 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