// (*nix version) Setup an initial connection (just plain
// text).
+ CalDAV CalDAVPlain;
+ CalDAVPlain.SetupConnectionData(&ConnPlain);
+
+ CalDAVStatus CalDAVPlainStatus = CalDAVPlain.GetConnectionData();
+
+ // Verify that the settings match with the CalDAVConnectionData
+ // passed.
+
+ ASSERT_EQ(CalDAVPlainStatus.Hostname, ConnPlain.Hostname);
+ ASSERT_EQ(CalDAVPlainStatus.Username, ConnPlain.Username);
+ ASSERT_EQ(CalDAVPlainStatus.Port, ConnPlain.Port);
+ ASSERT_EQ(CalDAVPlainStatus.Prefix, ConnPlain.Prefix);
+ ASSERT_EQ(CalDAVPlainStatus.UseSSL, ConnPlain.UseSSL);
+
// Verify that the connection was successful.
+ CalDAVServerResult ConnResult = CalDAVPlain.Connect();
+
+ ASSERT_EQ(CALDAVQUERYRESULT_OK, ConnResult.Result);
+ ASSERT_EQ(200, ConnResult.HTTPCode);
+ ASSERT_EQ(CURLE_OK, ConnResult.Code);
+
+ // Do another connection and this time the connection should
+ // fail due to being an invalid host name.
+
// (*nix version) Setup an initial connection (with a valid
// SSL certificate).