X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Ftests%2Fxestiacalendar_icaltimezonesave.h;h=2de91fd9853a182f4a581e7f5dd46fc50364b9aa;hb=2e304ff435c80c07daaf0d3fbe8a9ab7d1ae70b1;hp=abeb5b99a1feea5e2ecd977d4fd7b1f00086ebdb;hpb=93adeb6d3a5856fac60bbd3165949378e2916947;p=xestiacalendar%2F.git diff --git a/source/tests/xestiacalendar_icaltimezonesave.h b/source/tests/xestiacalendar_icaltimezonesave.h index abeb5b9..2de91fd 100644 --- a/source/tests/xestiacalendar_icaltimezonesave.h +++ b/source/tests/xestiacalendar_icaltimezonesave.h @@ -1,14 +1,14 @@ // xestiacalendar_icaltimezonesave.h - Xestia Calendar iCalendar Timezone 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. @@ -20,21 +20,21 @@ TEST(iCalendarSaveTimezone, SaveTimezoneTests){ - CalendarTimezoneObject TestTimezone; - CalendarTimezoneObject TestTimezone2; + CalendarTimezoneObject testTimezone; + CalendarTimezoneObject testTimezone2; // Load the first test timezone. - ASSERT_EQ(CALENDAROBJECTLOAD_OK, TestTimezone.LoadFile("iCalendarTimezone-Load1.vcf")); - ASSERT_EQ(CALENDAROBJECTVALID_OK, TestTimezone.ValidBaseObject()); + ASSERT_EQ(CALENDAROBJECTLOAD_OK, testTimezone.LoadFile("iCalendarTimezone-Load1.vcf")); + ASSERT_EQ(CALENDAROBJECTVALID_OK, testTimezone.ValidBaseObject()); - ASSERT_EQ(CALENDAROBJECTSAVE_CANNOTOPEN, TestTimezone.SaveFile("/stupidfilelocation/dontsavehere.ics")); + ASSERT_EQ(CALENDAROBJECTSAVE_CANNOTOPEN, testTimezone.SaveFile("/stupidfilelocation/dontsavehere.ics")); // Save the data to a string and compare the data. // First contact file. - std::string SaveDataComparison = "BEGIN:VCALENDAR\n" + std::string saveDataComparison = "BEGIN:VCALENDAR\n" "VERSION:2.0\n" "PRODID:-//Xestia//Calendar Unit Testing//KW\n" "BEGIN:VTIMEZONE\n" @@ -42,22 +42,22 @@ TEST(iCalendarSaveTimezone, SaveTimezoneTests){ "END:VTIMEZONE\n" "END:VCALENDAR"; - std::string SaveData; + std::string saveData; - TestTimezone.SaveString(&SaveData); + testTimezone.SaveString(&saveData); - ASSERT_EQ(SaveDataComparison, SaveData); + ASSERT_EQ(saveDataComparison, saveData); // Process the second calendar item. - ASSERT_EQ(CALENDAROBJECTLOAD_OK, TestTimezone2.LoadFile("iCalendarTimezone-Load2.vcf")); - ASSERT_EQ(CALENDAROBJECTVALID_OK, TestTimezone2.ValidBaseObject()); + ASSERT_EQ(CALENDAROBJECTLOAD_OK, testTimezone2.LoadFile("iCalendarTimezone-Load2.vcf")); + ASSERT_EQ(CALENDAROBJECTVALID_OK, testTimezone2.ValidBaseObject()); - SaveData.clear(); + saveData.clear(); - TestTimezone2.SaveString(&SaveData); + testTimezone2.SaveString(&saveData); - SaveDataComparison = "BEGIN:VCALENDAR\n" + saveDataComparison = "BEGIN:VCALENDAR\n" "VERSION:2.0\n" "PRODID:-//Xestia//Calendar Unit Testing//KW\n" "BEGIN:VTIMEZONE\n" @@ -80,6 +80,18 @@ TEST(iCalendarSaveTimezone, SaveTimezoneTests){ "TZOFFSETTO;EXAMPLE=DATA:-0400\n" "RRULE;YAK=YES:FREQ=DAILY;COUNT=10\n" "COMMENT;ALTREP=\"null:nodata\";LANGUAGE=kw;YO=YOYOS:Example timezone comment.\n" + "RDATE;VALUE=DATE;TZID=Europe/Truro;BEEP=BOOP:20160205,20160207,20160216,20160\n" + " 305\n" + "TZNAME;LANGUAGE=en;NOPE=YES:Example Timezone Name 1\n" + "X-MOO:Meep\n" + "X-MOO:Moop\n" + "X-MOO;MEEP=YIKES:Zaap\n" + "X-ITEM:Fork\n" + "X-ITEM:Spoon\n" + "X-ITEM;DIRTY=NO:Knife\n" + "X-NOPE:1\n" + "X-NOPE:2\n" + "X-NOPE;LONG=YES:3\n" "END:STANDARD\n" "BEGIN:DAYLIGHT\n" "DTSTART:20160204T020000\n" @@ -97,10 +109,22 @@ TEST(iCalendarSaveTimezone, SaveTimezoneTests){ "TZOFFSETTO;EXAMPLE=DATA:-0400\n" "RRULE;YAK=YES:FREQ=DAILY;COUNT=10\n" "COMMENT;ALTREP=\"null:nodata\";LANGUAGE=kw;YO=YOYOS:Example timezone comment.\n" + "RDATE;VALUE=DATE;TZID=Europe/Truro;BEEP=BOOP:20160205,20160207,20160216,20160\n" + " 305\n" + "TZNAME;LANGUAGE=en;NOPE=YES:Example Timezone Name 1\n" + "X-MOO:Meep\n" + "X-MOO:Moop\n" + "X-MOO;MEEP=YIKES:Zaap\n" + "X-ITEM:Fork\n" + "X-ITEM:Spoon\n" + "X-ITEM;DIRTY=NO:Knife\n" + "X-NOPE:1\n" + "X-NOPE:2\n" + "X-NOPE;LONG=YES:3\n" "END:DAYLIGHT\n" "END:VTIMEZONE\n" "END:VCALENDAR"; - ASSERT_EQ(SaveDataComparison, SaveData); + ASSERT_EQ(saveDataComparison, saveData); } \ No newline at end of file