Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added unit tests for REQUEST-STATUS in iCalendarEvent/ObjectDataTests.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 27 Jan 2016 20:41:37 +0000 (20:41 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 27 Jan 2016 20:41:37 +0000 (20:41 +0000)
source/tests/xestiacalendar_icaleventload.h

index 4e57b36..cc451ff 100644 (file)
@@ -658,4 +658,58 @@ TEST(iCalendarEvent, ObjectDataTests){
        ASSERT_EQ("20160125T133000Z", ExcludeDate);
        ASSERT_EQ("ZOOP=ZIPPO", ExcludeDataTokens);
        
+       // Get the first REQUEST-STATUS.
+
+       std::string RequestStatus;
+       
+       if (TestEvent.RequestStatusData.begin() != TestEvent.RequestStatusData.end()){
+               
+               RequestStatus = TestEvent.RequestStatusData[0];
+               
+       }
+       
+       ASSERT_EQ("2.0;Success", RequestStatus);
+       
+       // Get the second REQUEST-STATUS.
+       
+       RequestStatus.clear();
+       
+       std::string RequestLanguage;
+       
+       if (TestEvent.ContactList.size() > 1){
+               
+               RequestStatus = TestEvent.RequestStatusData[1];
+               
+       }
+       
+       if (TestEvent.ContactList.size() > 1){
+               
+               RequestLanguage = TestEvent.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 (TestEvent.ContactList.size() > 2){
+               
+               RequestStatus = TestEvent.RequestStatusData[2];
+               
+       }
+       
+       if (TestEvent.ContactList.size() > 2){
+               
+               RequestTokens = TestEvent.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