// Do another connection and this time the connection should
// fail due to being an invalid host name.
+ CalDAVConnectionData ConnPlainFail;
+ ConnPlainFail.Hostname = "server.invalid";
+ ConnPlainFail.Username = "fail";
+ ConnPlainFail.Password = "fail";
+ ConnPlainFail.Port = 80;
+ ConnPlainFail.UseSSL = false;
+
+ // Setup the CalDAV connection object.
+
+ CalDAV CalDAVPlainFail;
+ CalDAVPlainFail.SetupConnectionData(&ConnPlainFail);
+
+ // Setup the CalDAVStatus object.
+
+ CalDAVStatus CalDAVPlainFailStatus = CalDAVPlain.GetConnectionData();
+
+ // Connect and fail.
+
+ ConnResult = CalDAVPlainFail.Connect();
+
+ ASSERT_EQ(CALDAVQUERYRESULT_SERVERERROR, ConnResult.Result);
+ ASSERT_EQ(0, ConnResult.HTTPCode);
+ ASSERT_EQ(CURLE_COULDNT_RESOLVE_HOST, ConnResult.Code);
+
// (*nix version) Setup an initial connection (with a valid
// SSL certificate).