Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added unit tests for COMMENT in iCalendarJournal/ObjectDataTests.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Mon, 1 Feb 2016 21:55:38 +0000 (21:55 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Mon, 1 Feb 2016 21:55:38 +0000 (21:55 +0000)
source/tests/xestiacalendar_icalfreebusyload.h

index 37eb0ef..ced2205 100644 (file)
@@ -233,4 +233,66 @@ TEST(iCalendarFreeBusy, ObjectDataTests){
        ASSERT_EQ("kw", AttendeeDataLanguage);
        ASSERT_EQ("EXAMPLE=DATA", AttendeeDataTokens);
        
+       // Get the first COMMENT.
+       
+       std::string CommentData;
+       
+       if (TestFreeBusy.CommentList.begin() != TestFreeBusy.CommentList.end()){
+               
+               CommentData = TestFreeBusy.CommentList[0];
+               
+       }
+       
+       ASSERT_EQ("This is the first comment.", CommentData);
+       
+       // Get the second COMMENT.
+       
+       CommentData.clear();
+       
+       std::string CommentDataAltRep;
+       std::string CommentDataLanguage;
+       
+       if (TestFreeBusy.CommentList.size() > 1){
+               
+               CommentData = TestFreeBusy.CommentList[1];
+               
+       }
+       
+       if (TestFreeBusy.CommentList.size() > 1){
+               
+               CommentDataAltRep = TestFreeBusy.CommentListAltRep[1];
+               
+       }
+       
+       if (TestFreeBusy.CommentList.size() > 1){
+               
+               CommentDataLanguage = TestFreeBusy.CommentListLanguage[1];
+               
+       }
+       
+       ASSERT_EQ("This is the second comment.", CommentData);
+       ASSERT_EQ("null:nodata", CommentDataAltRep);
+       ASSERT_EQ("en", CommentDataLanguage);
+       
+       // Get the third COMMENT.
+       
+       CommentData.clear();
+       
+       std::string CommentDataTokens;
+       
+       if (TestFreeBusy.CommentList.size() > 2){
+               
+               CommentData = TestFreeBusy.CommentList[2];
+               
+       }
+       
+       if (TestFreeBusy.CommentList.size() > 2){
+               
+               CommentDataTokens = TestFreeBusy.CommentListTokens[2];
+               
+       }
+       
+       ASSERT_EQ("This is the third comment.", CommentData);
+       ASSERT_EQ("ZEBRAS=YES", CommentDataTokens);
+       
 }
\ 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