TEST(CalDAV, ListCalendars){
- CalDAVConnectionData ConnNormal;
+ CalDAVConnectionData ConnNormal;
+ string CurrentUserPrincipal;
bool ValidDataNormal = false;
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