From: Steve Brokenshire Date: Sun, 31 Jan 2016 11:15:31 +0000 (+0000) Subject: Added unit tests for DESCRIPTION in iCalendarTask/ObjectDataTests. X-Git-Tag: release-0.02~574 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=0dbb1bdc9ec1a04f5e57706964f8939ce658785d;p=xestiacalendar%2F.git Added unit tests for DESCRIPTION in iCalendarTask/ObjectDataTests. --- diff --git a/source/tests/xestiacalendar_icaltaskload.h b/source/tests/xestiacalendar_icaltaskload.h index e67be93..0b06238 100644 --- a/source/tests/xestiacalendar_icaltaskload.h +++ b/source/tests/xestiacalendar_icaltaskload.h @@ -59,4 +59,32 @@ TEST(iCalendarTask, ObjectDataTests){ ASSERT_EQ("20160131T080000Z", TestTask.DateTimeCreatedData); ASSERT_EQ("CARAMEL=PLEASE", TestTask.DateTimeCreatedTokens); + // Tests for DESCRIPTION. + + std::string DescriptionData; + std::string DescriptionAltRep; + std::string DescriptionLanguage; + std::string DescriptionTokens; + + if (TestTask.DescriptionList.begin() != TestTask.DescriptionList.end()){ + DescriptionData = TestTask.DescriptionList[0]; + } + + if (TestTask.DescriptionListAltRep.begin() != TestTask.DescriptionListAltRep.end()){ + DescriptionAltRep = TestTask.DescriptionListAltRep[0]; + } + + if (TestTask.DescriptionListLanguage.begin() != TestTask.DescriptionListLanguage.end()){ + DescriptionLanguage = TestTask.DescriptionListLanguage[0]; + } + + if (TestTask.DescriptionListTokens.begin() != TestTask.DescriptionListTokens.end()){ + DescriptionTokens = TestTask.DescriptionListTokens[0]; + } + + ASSERT_EQ("This is a description of the todo.", DescriptionData); + ASSERT_EQ("null:nodata", DescriptionAltRep); + ASSERT_EQ("kw", DescriptionLanguage); + ASSERT_EQ("EXAMPLE=TOKEN;MOREDATA=YES", DescriptionTokens); + } \ No newline at end of file