Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added unit tests to the ListCalendars CalDAV object tests.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Thu, 3 Mar 2016 03:51:15 +0000 (03:51 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Thu, 3 Mar 2016 03:51:15 +0000 (03:51 +0000)
source/tests/xestiacalendar_caldav.h

index 4b666c0..7d4c005 100644 (file)
@@ -370,7 +370,8 @@ TEST(CalDAV, CalendarServerSupport){
 
 TEST(CalDAV, ListCalendars){
        
-       CalDAVConnectionData ConnNormal;        
+       CalDAVConnectionData ConnNormal;
+       string CurrentUserPrincipal;
 
        bool ValidDataNormal = false;
        
@@ -403,8 +404,48 @@ TEST(CalDAV, ListCalendars){
        
        CalDAVServerResult ConnResult = ServerConnection.Connect();
        
-       ASSERT_EQ(CALDAVQUERYRESULT_OK, ConnResult.Result);
+       EXPECT_EQ(CALDAVQUERYRESULT_OK, ConnResult.Result);
+       ASSERT_EQ(200, ConnResult.HTTPCode);
+       ASSERT_EQ(CURLE_OK, ConnResult.Code);
+       
+       // Check that the server supports CalDAV.
+       
+       CalDAVServerSupport ConnSupport = ServerConnection.GetServerSupport();
+       ConnResult = ServerConnection.GetServerResult();
+       
+       EXPECT_EQ(CALDAVQUERYRESULT_OK, ConnResult.Result);
+       ASSERT_EQ(200, ConnResult.HTTPCode);
+       ASSERT_EQ(CURLE_OK, ConnResult.Code);
+       ASSERT_EQ(true, ConnSupport.BasicSupport);
+       
+       // Get the list of calendars.
+       
+       CalDAVCalendarList CalendarList = ServerConnection.GetCalendars();
+       
+       // Check the response result from the server.
+       
+       ConnResult = ServerConnection.GetServerResult();
+       
+       EXPECT_EQ(CALDAVQUERYRESULT_OK, ConnResult.Result);
        ASSERT_EQ(200, ConnResult.HTTPCode);
        ASSERT_EQ(CURLE_OK, ConnResult.Code);
        
+       // Get the user principal.
+       
+       CurrentUserPrincipal = ServerConnection.GetUserPrincipal();
+       
+       // Check the response from the server.
+       
+       ConnResult = ServerConnection.GetServerResult();
+       
+       EXPECT_EQ(CALDAVQUERYRESULT_OK, ConnResult.Result);
+       ASSERT_EQ(207, ConnResult.HTTPCode);
+       ASSERT_EQ(CURLE_OK, ConnResult.Code);
+       
+       // Get the list of calendars.
+       
+       
+       
+       
+       
 }
\ 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