Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added unit tests for DESCRIPTION in iCalendarTask/ObjectDataTests.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 31 Jan 2016 11:15:31 +0000 (11:15 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 31 Jan 2016 11:15:31 +0000 (11:15 +0000)
source/tests/xestiacalendar_icaltaskload.h

index e67be93..0b06238 100644 (file)
@@ -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
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy