From bbe75a3dee58699f5604d495d1302d07ba2dd078 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Thu, 9 Jun 2016 22:37:59 +0100 Subject: [PATCH] Added initial tests for the iCalendarTimezone-Load2.vcf --- .../tests/xestiacalendar_icaltimezonesave.h | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/source/tests/xestiacalendar_icaltimezonesave.h b/source/tests/xestiacalendar_icaltimezonesave.h index 0bc4a3b..8afaa2d 100644 --- a/source/tests/xestiacalendar_icaltimezonesave.h +++ b/source/tests/xestiacalendar_icaltimezonesave.h @@ -21,6 +21,7 @@ TEST(iCalendarSaveTimezone, SaveTimezoneTests){ CalendarTimezoneObject TestTimezone; + CalendarTimezoneObject TestTimezone2; // Load the first test timezone. @@ -47,4 +48,23 @@ TEST(iCalendarSaveTimezone, SaveTimezoneTests){ ASSERT_EQ(SaveDataComparison, SaveData); + // Process the second calendar item. + + ASSERT_EQ(CALENDAROBJECTLOAD_OK, TestTimezone2.LoadFile("iCalendarTimezone-Load2.vcf")); + ASSERT_EQ(CALENDAROBJECTVALID_OK, TestTimezone2.ValidBaseObject()); + + SaveData.clear(); + + TestTimezone2.SaveString(&SaveData); + + SaveDataComparison = "BEGIN:VCALENDAR\n" + "VERSION:2.0\n" + "PRODID:-//Xestia//Calendar Unit Testing//KW\n" + "BEGIN:VTIMEZONE\n" + "TZID;OTHER=PARAM:Example/Starrgazy\n" + "END:VTIMEZONE\n" + "END:VCALENDAR"; + + ASSERT_EQ(SaveDataComparison, SaveData); + } \ No newline at end of file -- 2.39.5