Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added unit tests for DESCRIPTION and GEO for iCalendarEvent/ObjectDataTests
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 24 Jan 2016 09:12:37 +0000 (09:12 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 24 Jan 2016 09:12:37 +0000 (09:12 +0000)
source/tests/xestiacalendar_icaleventload.h

index 87f7bd5..96d40db 100644 (file)
@@ -78,5 +78,38 @@ TEST(iCalendarEvent, ObjectDataTests){
 
        ASSERT_EQ("20160123T081100Z", TestEvent.DateTimeCreatedData);
        ASSERT_EQ("CARAMEL=PLEASE", TestEvent.DateTimeCreatedTokens);
+       
+       // Tests for DESCRIPTION.
+       
+       std::string DescriptionData;
+       std::string DescriptionAltRep;
+       std::string DescriptionLanguage;
+       std::string DescriptionTokens;
+       
+       if (TestEvent.DescriptionList.begin() != TestEvent.DescriptionList.end()){
+               DescriptionData = TestEvent.DescriptionList[0];
+       }
+
+       if (TestEvent.DescriptionListAltRep.begin() != TestEvent.DescriptionListAltRep.end()){
+               DescriptionAltRep = TestEvent.DescriptionListAltRep[0];
+       }
 
+       if (TestEvent.DescriptionListAltRep.begin() != TestEvent.DescriptionListAltRep.end()){
+               DescriptionLanguage = TestEvent.DescriptionListLanguage[0];
+       }
+
+       if (TestEvent.DescriptionListTokens.begin() != TestEvent.DescriptionListTokens.end()){
+               DescriptionTokens = TestEvent.DescriptionListTokens[0];
+       }
+       
+       ASSERT_EQ("This is a description of the event.", DescriptionData);
+       ASSERT_EQ("null:nodata", DescriptionAltRep);
+       ASSERT_EQ("kw", DescriptionLanguage);
+       ASSERT_EQ("EXAMPLE=TOKEN;MOREDATA=YES", DescriptionTokens);
+
+       // Tests for GEO.
+       
+       ASSERT_EQ("5.0;5.0", TestEvent.GeographicData);
+       ASSERT_EQ("EXAMPLE=MEEP", TestEvent.GeographicTokens);
+       
 }
\ 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