X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Ftests%2Fxestiacalendar_icaltasksave.h;h=da64ffc3389afa5fcc1f407c1080969e21d803ce;hb=cba151c4b833a26c63984769f921bab5e755decd;hp=84e554ac5fe5af18c1320867b728b96c599c184b;hpb=db338bcb1b768766fb26db571b46dd542ae496b5;p=xestiacalendar%2F.git diff --git a/source/tests/xestiacalendar_icaltasksave.h b/source/tests/xestiacalendar_icaltasksave.h index 84e554a..da64ffc 100644 --- a/source/tests/xestiacalendar_icaltasksave.h +++ b/source/tests/xestiacalendar_icaltasksave.h @@ -1,14 +1,14 @@ // xestiacalendar_icaltasksave.h - Xestia Calendar iCalendar Task Component Save Unit Tests // -// (c) 2016 Xestia Software Development. +// (c) 2016-2017 Xestia Software Development. // // This file is part of Xestia Calendar. // -// Xestia Address Book is free software: you can redistribute it and/or modify +// Xestia Calendar is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by the // Free Software Foundation, version 3 of the license. // -// Xestia Address Book is distributed in the hope that it will be useful, +// Xestia Calendar is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. @@ -22,6 +22,7 @@ TEST(iCalendarSaveTask, SaveTaskTests){ CalendarTaskObject TestTask; CalendarTaskObject TestTask2; + CalendarTaskObject TestTask3; // Load the test journal information. @@ -186,4 +187,26 @@ TEST(iCalendarSaveTask, SaveTaskTests){ ASSERT_EQ(SaveDataComparison, SaveData); + // Third task file. + + SaveDataComparison = "BEGIN:VCALENDAR\n" + "VERSION:2.0\n" + "PRODID:-//Xestia//Calendar Unit Testing//KW\n" + "BEGIN:VTODO\n" + "UID:b3a16392-ad86-4061-be53-c215af2306df\n" + "DTSTAMP;OTHER=PARAM:20160131T104500Z\n" + "DTSTART:20160131T103000Z\n" + "DURATION;TEST=YES:PT15M\n" + "END:VTODO\n" + "END:VCALENDAR"; + + ASSERT_EQ(CALENDAROBJECTLOAD_OK, TestTask3.LoadFile("iCalendarTask-Load3.vcf")); + ASSERT_EQ(CALENDAROBJECTVALID_OK, TestTask3.ValidBaseObject()); + + SaveData.clear(); + + TestTask3.SaveString(&SaveData); + + ASSERT_EQ(SaveDataComparison, SaveData); + } \ No newline at end of file