From: Steve Brokenshire Date: Sun, 31 Jan 2016 13:11:34 +0000 (+0000) Subject: Added unit tests for DUE and DURATION in iCalendarTask/ObjectDataTests. X-Git-Tag: release-0.02~537 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=6d34a9e703dced045fda06239f140280b27b6988;p=xestiacalendar%2F.git Added unit tests for DUE and DURATION in iCalendarTask/ObjectDataTests. --- diff --git a/source/tests/xestiacalendar_icaltaskload.h b/source/tests/xestiacalendar_icaltaskload.h index 5a786dc..741747d 100644 --- a/source/tests/xestiacalendar_icaltaskload.h +++ b/source/tests/xestiacalendar_icaltaskload.h @@ -166,4 +166,20 @@ TEST(iCalendarTask, ObjectDataTests){ ASSERT_EQ("FREQ=DAILY;COUNT=10", TestTask.RecurranceRuleData); ASSERT_EQ("TEST=DATA", TestTask.RecurranceRuleDataTokens); + // Tests for DUE. + + ASSERT_EQ("20160131T150000Z", TestTask.DueData); + ASSERT_EQ("Europe/Truro", TestTask.DueDataTimeZoneID); + ASSERT_EQ("DATE-TIME", TestTask.DueDataValue); + ASSERT_EQ("TEST=YES", TestTask.DueDataTokens); + + // Tests for DURATION. + + CalendarTaskObject TestTask2; + ASSERT_EQ(CALENDAROBJECTLOAD_OK, TestTask2.LoadFile("iCalendarTask-Load3.vcf")); + ASSERT_EQ(CALENDAROBJECTVALID_OK, TestTask2.ValidBaseObject()); + + ASSERT_EQ("PT15M", TestTask2.DurationData); + ASSERT_EQ("TEST=YES", TestTask2.DurationDataTokens); + } \ No newline at end of file