Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added unit tests for the plain connection for the CalDAV object.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 28 Feb 2016 23:56:35 +0000 (23:56 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 28 Feb 2016 23:56:35 +0000 (23:56 +0000)
source/tests/xestiacalendar_caldav.h

index 885d8a6..c4db5ba 100644 (file)
@@ -132,8 +132,31 @@ TEST(CalDAV, BasicTests){
        // (*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).
        
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy