+ EXPECT_EQ(CALDAVQUERYRESULT_OK, connResult.result);
+ ASSERT_EQ(204, connResult.httpCode);
+ ASSERT_EQ(CURLE_OK, connResult.code);
+
+}
+
+TEST(CalDAV, GetEntryList){
+
+ // Check that EntryCalendarHREFProcessing is not blank.
+
+ ASSERT_NE("", entryCalendarHREFProcessing);
+
+ CalDAVConnectionData connNormal;
+ string currentUserPrincipal;
+
+ bool validDataNormal = false;
+
+ // Attempt to read the caldavtest.auth file.
+
+ ProcessConnectionDataFileResult dataFileResult = ProcessConnectionDataFile("caldavtest.auth", &connNormal);
+ if (dataFileResult == PROCESSCONNECTIONDATAFILE_OK){
+ validDataNormal = true;
+ }
+
+ ASSERT_EQ(true, validDataNormal);
+
+ // Setup the connection.
+
+ CalDAV serverConnection;
+
+ serverConnection.SetupConnectionData(&connNormal);
+
+ // Verify the connection settings.
+
+ CalDAVStatus calDAVStatus = serverConnection.GetConnectionData();
+
+ ASSERT_EQ(calDAVStatus.hostname, connNormal.hostname);
+ ASSERT_EQ(calDAVStatus.username, connNormal.username);
+ ASSERT_EQ(calDAVStatus.port, connNormal.port);
+ ASSERT_EQ(calDAVStatus.prefix, connNormal.prefix);
+ ASSERT_EQ(calDAVStatus.useSSL, connNormal.useSSL);
+
+ // Connect to the server.
+
+ CalDAVServerResult connResult = serverConnection.Connect();
+
+ 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 user principal.
+
+ string userPrincipalURI = serverConnection.GetUserPrincipal();
+
+ // Get the calendar home.