Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added unit tests for REQUEST-STATUS in iCalendarFreeBusy/ObjectDataTests.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 3 Feb 2016 17:49:36 +0000 (17:49 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 3 Feb 2016 17:49:36 +0000 (17:49 +0000)
source/tests/xestiacalendar_icalfreebusyload.h

index aed374c..f6704d4 100644 (file)
@@ -357,4 +357,58 @@ TEST(iCalendarFreeBusy, ObjectDataTests){
        ASSERT_EQ("20160202T230000Z/PT9H", FreeBusyData);
        ASSERT_EQ("RESULT=ARGH;TEST=YES", FreeBusyTokens);
        
+       // Get the first REQUEST-STATUS.
+
+       std::string RequestStatus;
+       
+       if (TestFreeBusy.RequestStatusData.begin() != TestFreeBusy.RequestStatusData.end()){
+               
+               RequestStatus = TestFreeBusy.RequestStatusData[0];
+               
+       }
+       
+       ASSERT_EQ("2.0;Success", RequestStatus);
+       
+       // Get the second REQUEST-STATUS.
+       
+       RequestStatus.clear();
+       
+       std::string RequestLanguage;
+       
+       if (TestFreeBusy.RequestStatusData.size() > 1){
+               
+               RequestStatus = TestFreeBusy.RequestStatusData[1];
+               
+       }
+       
+       if (TestFreeBusy.RequestStatusData.size() > 1){
+               
+               RequestLanguage = TestFreeBusy.RequestStatusLanguage[1];
+               
+       }
+       
+       ASSERT_EQ("3.42;Really big irrecoverable error caused by the user", RequestStatus);
+       ASSERT_EQ("en", RequestLanguage);
+       
+       // Get the third REQUEST-STATUS.
+       
+       RequestStatus.clear();
+       
+       std::string RequestTokens;
+       
+       if (TestFreeBusy.RequestStatusData.size() > 2){
+               
+               RequestStatus = TestFreeBusy.RequestStatusData[2];
+               
+       }
+       
+       if (TestFreeBusy.RequestStatusData.size() > 2){
+               
+               RequestTokens = TestFreeBusy.RequestStatusTokens[2];
+               
+       }
+       
+       ASSERT_EQ("3.7;Invalid calendar user", RequestStatus);
+       ASSERT_EQ("USER=MISSING", RequestTokens);
+       
 }
\ 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