X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Ftests%2Fxestiacalendar_caldav.h;h=885d8a612f94923cfd8b125e0e7f97c207409ebd;hb=2a195773ad97990e6a3c37efd05a75426767c075;hp=1bb636650801b86331d2805a95de2a40f8c173fd;hpb=497e770ff0c01c48bb7212916de151f139f024e4;p=xestiacalendar%2F.git diff --git a/source/tests/xestiacalendar_caldav.h b/source/tests/xestiacalendar_caldav.h index 1bb6366..885d8a6 100644 --- a/source/tests/xestiacalendar_caldav.h +++ b/source/tests/xestiacalendar_caldav.h @@ -1,4 +1,4 @@ -// xestiacalendar_icaleventload.h - Xestia Calendar CalDAV Object Unit Tests +// xestiacalendar_caldav.h - Xestia Calendar CalDAV Object Unit Tests // // (c) 2016 Xestia Software Development. // @@ -17,6 +17,7 @@ // with Xestia Calendar. If not, see #include "../objects/CalDAV/CalDAV.h" +#include "xestiacalendar_testcommon.h" #include #include @@ -24,15 +25,44 @@ using namespace std; TEST(CalDAV, BasicTests){ + CalDAVConnectionData ConnPlain; + CalDAVConnectionData ConnNormal; + CalDAVConnectionData ConnFail; + CalDAVConnectionData ConnTimeout; + ProcessConnectionDataFileResult DataFileResult; + bool ValidDataPlain = false; bool ValidDataNormal = false; bool ValidDataFail = false; bool ValidDataTimeout = false; // Attempt to read the caldavtest-plain.auth file. + + DataFileResult = ProcessConnectionDataFile("caldavtest-plain.auth", &ConnPlain); + if (DataFileResult == PROCESSCONNECTIONDATAFILE_OK){ + ValidDataPlain = true; + } + + // Attempt to read the caldavtest.auth file. + + DataFileResult = ProcessConnectionDataFile("caldavtest.auth", &ConnNormal); + if (DataFileResult == PROCESSCONNECTIONDATAFILE_OK){ + ValidDataNormal = true; + } + // Attempt to read the caldavtest-fail.auth file. + + DataFileResult = ProcessConnectionDataFile("caldavtest-fail.auth", &ConnFail); + if (DataFileResult == PROCESSCONNECTIONDATAFILE_OK){ + ValidDataFail = true; + } + // Attempt to read the caldavtest-timeout.auth file. - // Attempt to read the caldavtest.auth file. + + DataFileResult = ProcessConnectionDataFile("caldavtest-fail.auth", &ConnTimeout); + if (DataFileResult == PROCESSCONNECTIONDATAFILE_OK){ + ValidDataTimeout = true; + } if (ValidDataPlain == false){