+ EXPECT_EQ(COCONNECT_SSLFAIL, FakeConnection.Connect(false));
+ EXPECT_EQ(COSSL_UNABLETOVERIFY, FakeConnection.SSLVerify());
+
+}
+
+TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Has_User_Verified_SSL_Cerficiate_Data){
+
+ std::string ServerAddress1 = "gibberish.invalid";
+ std::string ServerUser1 = "user";
+ std::string ServerPass1 = "pass";
+
+ FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, true);
+ FakeConnection.ResultSSLVerified = COSSL_VERIFIED_USER;
+ FakeConnection.Connect(false);
+
+ EXPECT_EQ(COSSL_VERIFIED_USER, FakeConnection.SSLVerify());
+
+}
+
+TEST(CardDAV, Use_Fake_To_Simulate_A_Connection_That_Doesnt_Use_SSL_Return_Not_Applicable_SSL_Result){
+
+ std::string ServerAddress1 = "gibberish.invalid";
+ std::string ServerUser1 = "user";
+ std::string ServerPass1 = "pass";
+
+ FakeConnectionObject FakeConnection(ServerAddress1, 8080, ServerUser1, ServerPass1, false);
+ FakeConnection.ResultSSLVerified = COSSL_NOTAPPLICABLE;
+ FakeConnection.Connect(false);
+
+ EXPECT_EQ(COSSL_NOTAPPLICABLE, FakeConnection.SSLVerify());