From cf7e25e6532e1a53b2591aaf899eb305a6c0268b Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 31 Jan 2016 14:20:41 +0000 Subject: [PATCH] Added unit tests for DTSTAMP in iCalendarJournal/ObjectDataTests. --- source/tests/xestiacalendar_icaljournalload.h | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/source/tests/xestiacalendar_icaljournalload.h b/source/tests/xestiacalendar_icaljournalload.h index d28cdf2..9c06acc 100644 --- a/source/tests/xestiacalendar_icaljournalload.h +++ b/source/tests/xestiacalendar_icaljournalload.h @@ -20,10 +20,23 @@ TEST(iCalendarJournal, BasicTests){ - CalendarJournalObject TestEvent; + CalendarJournalObject TestJournal; - ASSERT_EQ(CALENDAROBJECTLOAD_MISSING, TestEvent.LoadFile("iCalendarJournal-Missing.vcf")); - ASSERT_EQ(CALENDAROBJECTLOAD_CANNOTOPEN, TestEvent.LoadFile("iCalendarJournal-InvalidPermissions.vcf")); - ASSERT_EQ(CALENDAROBJECTLOAD_OK, TestEvent.LoadFile("iCalendarJournal-Load1.vcf")); + ASSERT_EQ(CALENDAROBJECTLOAD_MISSING, TestJournal.LoadFile("iCalendarJournal-Missing.vcf")); + ASSERT_EQ(CALENDAROBJECTLOAD_CANNOTOPEN, TestJournal.LoadFile("iCalendarJournal-InvalidPermissions.vcf")); + ASSERT_EQ(CALENDAROBJECTLOAD_OK, TestJournal.LoadFile("iCalendarJournal-Load1.vcf")); + +} + +TEST(iCalendarJournal, ObjectDataTests){ + + CalendarEventObject TestJournal; + ASSERT_EQ(CALENDAROBJECTLOAD_OK, TestJournal.LoadFile("iCalendarEvent-Load2.vcf")); + ASSERT_EQ(CALENDAROBJECTVALID_OK, TestJournal.ValidBaseObject()); + + // Tests for DTSTAMP. + + ASSERT_EQ("20160122T124100Z", TestJournal.DateTimeStampData); + ASSERT_EQ("OTHER=PARAM", TestJournal.DateTimeStampTokens); } \ No newline at end of file -- 2.39.5