From 6d34a9e703dced045fda06239f140280b27b6988 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 31 Jan 2016 13:11:34 +0000 Subject: [PATCH] Added unit tests for DUE and DURATION in iCalendarTask/ObjectDataTests. --- source/tests/xestiacalendar_icaltaskload.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 -- 2.39.5