From: Steve Brokenshire Date: Sat, 13 Feb 2016 16:38:36 +0000 (+0000) Subject: Added unit tests to process TRIGGER in VALARM for CalendarEventObject. X-Git-Tag: release-0.02~373 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=07782bf211336b49c6b03a88af67f3a690ebc035;p=xestiacalendar%2F.git Added unit tests to process TRIGGER in VALARM for CalendarEventObject. --- diff --git a/source/tests/xestiacalendar_icaleventload.h b/source/tests/xestiacalendar_icaleventload.h index 3085676..3118907 100644 --- a/source/tests/xestiacalendar_icaleventload.h +++ b/source/tests/xestiacalendar_icaleventload.h @@ -1075,21 +1075,29 @@ TEST(iCalendarEvent, ObjectDataTests){ std::string ActionData; std::string ActionDataTokens; - if (TestEvent.CalendarAlarmData.size() > 0){ + std::string TriggerData; + std::string TriggerRelated; + std::string TriggerValue; + std::string TriggerTokens; - ActionData = TestEvent.CalendarAlarmData[0].AlarmAction; - - } - if (TestEvent.CalendarAlarmData.size() > 0){ + ActionData = TestEvent.CalendarAlarmData[0].AlarmAction; ActionDataTokens = TestEvent.CalendarAlarmData[0].AlarmActionTokens; + TriggerData = TestEvent.CalendarAlarmData[0].TriggerData; + TriggerRelated = TestEvent.CalendarAlarmData[0].TriggerRelated; + TriggerValue = TestEvent.CalendarAlarmData[0].TriggerValue; + TriggerTokens = TestEvent.CalendarAlarmData[0].TriggerTokens; + } ASSERT_EQ("AUDIO", ActionData); ASSERT_EQ("FUNKY=SOUNDS", ActionDataTokens); - + ASSERT_EQ("20160220T160000Z", TriggerData); + ASSERT_EQ("END", TriggerRelated); + ASSERT_EQ("DATE-TIME", TriggerValue); + ASSERT_EQ("PUSH=BUTTON", TriggerTokens); } \ No newline at end of file