From 0023779bb15e4b3d9f2f17f57ff116090dc5bb66 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Tue, 1 Mar 2016 10:16:48 +0000 Subject: [PATCH] Added unit tests for checking that the InvalidSSL connection data matches. --- source/tests/xestiacalendar_caldav.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/source/tests/xestiacalendar_caldav.h b/source/tests/xestiacalendar_caldav.h index a8e0aee..aaca024 100644 --- a/source/tests/xestiacalendar_caldav.h +++ b/source/tests/xestiacalendar_caldav.h @@ -210,6 +210,20 @@ TEST(CalDAV, BasicTests){ // (*nix version) Setup an initial connection on a server that // will fail due to having an invalid SSL certificate. + CalDAV CalDAVInvalidSSL; + CalDAVInvalidSSL.SetupConnectionData(&ConnInvalidSSL); + + // Verify that the settings match with the CalDAVConnectionData + // passed. + + CalDAVStatus CalDAVInvalidSSLStatus = CalDAVInvalidSSL.GetConnectionData(); + + ASSERT_EQ(CalDAVInvalidSSLStatus.Hostname, ConnInvalidSSL.Hostname); + ASSERT_EQ(CalDAVInvalidSSLStatus.Username, ConnInvalidSSL.Username); + ASSERT_EQ(CalDAVInvalidSSLStatus.Port, ConnInvalidSSL.Port); + ASSERT_EQ(CalDAVInvalidSSLStatus.Prefix, ConnInvalidSSL.Prefix); + ASSERT_EQ(CalDAVInvalidSSLStatus.UseSSL, ConnInvalidSSL.UseSSL); + // Verify that the connection had failed. (with an invalid // SSL certificate). -- 2.39.2