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

index dd4f64c..d25a215 100644 (file)
@@ -746,5 +746,58 @@ TEST(iCalendarJournal, ObjectDataTests){
        ASSERT_EQ("20160520", RecurrenceDate);
        ASSERT_EQ("ZILCH=DATA", RecurrenceTokens);
 
+       // Get the first REQUEST-STATUS.
+
+       std::string RequestStatus;
+       
+       if (TestJournal.RequestStatusData.begin() != TestJournal.RequestStatusData.end()){
+               
+               RequestStatus = TestJournal.RequestStatusData[0];
+               
+       }
+       
+       ASSERT_EQ("2.0;Success", RequestStatus);
+       
+       // Get the second REQUEST-STATUS.
+       
+       RequestStatus.clear();
+       
+       std::string RequestLanguage;
+       
+       if (TestJournal.ContactList.size() > 1){
+               
+               RequestStatus = TestJournal.RequestStatusData[1];
+               
+       }
+       
+       if (TestJournal.ContactList.size() > 1){
+               
+               RequestLanguage = TestJournal.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 (TestJournal.ContactList.size() > 2){
+               
+               RequestStatus = TestJournal.RequestStatusData[2];
+               
+       }
+       
+       if (TestJournal.ContactList.size() > 2){
+               
+               RequestTokens = TestJournal.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