Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added unit tests for RESOURCES in iCalendarEvent/ObjectDataTests.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 27 Jan 2016 21:35:37 +0000 (21:35 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 27 Jan 2016 21:35:37 +0000 (21:35 +0000)
source/tests/xestiacalendar_icaleventload.h

index 89e33d5..a0227a8 100644 (file)
@@ -766,4 +766,66 @@ TEST(iCalendarEvent, ObjectDataTests){
        ASSERT_EQ("person.3@example.com", RelatedTo);
        ASSERT_EQ("SCHOOL=MEETING", RelatedToTokens);
        
+       // Get the first RESOURCES.
+
+       std::string Resources;
+       
+       if (TestEvent.ResourcesData.begin() != TestEvent.ResourcesData.end()){
+               
+               Resources = TestEvent.ResourcesData[0];
+               
+       }
+       
+       ASSERT_EQ("DMAC RECEIVER", Resources);
+       
+       // Get the second RESOURCES.
+       
+       Resources.clear();
+       
+       std::string ResourcesLanguage;
+       
+       if (TestEvent.ResourcesData.size() > 1){
+               
+               Resources = TestEvent.ResourcesData[1];
+               
+       }
+       
+       if (TestEvent.ResourcesData.size() > 1){
+               
+               ResourcesLanguage = TestEvent.ResourcesDataLanguage[1];
+               
+       }
+       
+       ASSERT_EQ("PAL-I TELEVISION SET", Resources);
+       ASSERT_EQ("en", ResourcesLanguage);
+       
+       // Get the third RESOURCES.
+       
+       Resources.clear();
+       
+       std::string ResourcesAltRep;
+       std::string ResourcesTokens;
+       
+       if (TestEvent.ResourcesData.size() > 2){
+               
+               Resources = TestEvent.ResourcesData[2];
+               
+       }
+               
+       if (TestEvent.ResourcesData.size() > 2){
+               
+               ResourcesAltRep = TestEvent.ResourcesDataAltRep[2];
+               
+       }
+       
+       if (TestEvent.ResourcesData.size() > 2){
+               
+               ResourcesTokens = TestEvent.ResourcesDataTokens[2];
+               
+       }
+       
+       ASSERT_EQ("PAL/SECAM VCR", Resources);
+       ASSERT_EQ("null:nodata", ResourcesAltRep);
+       ASSERT_EQ("STATUS=BROKEN", ResourcesTokens);
+       
 }
\ 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