Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added second set of tests for property names with a semi-colon in.
[xestiacalendar/.git] / source / tests / xestiacalendar_commonfunctions.h
index 7315d54..e6499fc 100644 (file)
@@ -43,6 +43,24 @@ TEST(CommonFunctions, ProcessTextVectorsTests){
        TextPropertiesExample1.push_back("COMMENT");
        TextValueExample1.push_back("This is the third comment.");
 
+       TextPropertiesExample1.push_back("CONTACT;TEST=VALUE");
+       TextValueExample1.push_back("First Contact");
+
+       TextPropertiesExample1.push_back("CONTACT;LAZY=NOPE");
+       TextValueExample1.push_back("Second Contact");
+
+       TextPropertiesExample1.push_back("CONTACT;SETUP=NO");
+       TextValueExample1.push_back("Third Contact");
+       
+       TextPropertiesExample1.push_back("RESOURCES;ROOM=YES");
+       TextValueExample1.push_back("First Resource Widget");
+
+       TextPropertiesExample1.push_back("RESOURCES;ROOM=NO");
+       TextValueExample1.push_back("Second Resource Widget");
+
+       TextPropertiesExample1.push_back("RESOURCES;ROOM=UNKNOWN");
+       TextValueExample1.push_back("Third Resource Widget");
+
        TextExample1TestResult.insert(make_pair("ATTENDEE", "Example Attendee 1"));
        TextExample1TestResult.insert(make_pair("ATTENDEE", "Example Attendee 2"));
        TextExample1TestResult.insert(make_pair("ATTENDEE", "Example Attendee 3"));
@@ -63,4 +81,18 @@ TEST(CommonFunctions, ProcessTextVectorsTests){
        
        ASSERT_EQ(TextExample1TestResult, ProcessTextVectors(&TextPropertiesExample1, &TextValueExample1, true, "COMMENT"));
 
+       TextExample1TestResult.clear();
+       TextExample1TestResult.insert(make_pair("CONTACT;TEST=VALUE", "First Contact"));
+       TextExample1TestResult.insert(make_pair("CONTACT;LAZY=NOPE", "Second Contact"));
+       TextExample1TestResult.insert(make_pair("CONTACT;SETUP=NO", "Third Contact"));
+       
+       ASSERT_EQ(TextExample1TestResult, ProcessTextVectors(&TextPropertiesExample1, &TextValueExample1, true, "CONTACT"));
+
+       TextExample1TestResult.clear();
+       TextExample1TestResult.insert(make_pair("RESOURCES;ROOM=YES", "First Resource Widget"));
+       TextExample1TestResult.insert(make_pair("RESOURCES;ROOM=NO", "Second Resource Widget"));
+       TextExample1TestResult.insert(make_pair("RESOURCES;ROOM=UNKNOWN", "Third Resource Widget"));
+
+       ASSERT_EQ(TextExample1TestResult, ProcessTextVectors(&TextPropertiesExample1, &TextValueExample1, true, "RESOURCES"));
+
 }
\ 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