Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added test to check result on a single match for ATTENDEE.
[xestiacalendar/.git] / source / tests / xestiacalendar_commonfunctions.h
index e6499fc..dc81f98 100644 (file)
@@ -61,12 +61,26 @@ TEST(CommonFunctions, ProcessTextVectorsTests){
        TextPropertiesExample1.push_back("RESOURCES;ROOM=UNKNOWN");
        TextValueExample1.push_back("Third Resource Widget");
 
+       TextPropertiesExample1.push_back("RELATED;RELATION=NO");
+       TextValueExample1.push_back("First Relation");
+
+       TextPropertiesExample1.push_back("RELATED;RELATION=YES");
+       TextValueExample1.push_back("Second Relation");
+
+       TextPropertiesExample1.push_back("RELATED;RELATION=MAYBE");
+       TextValueExample1.push_back("Third Relation");
+
        TextExample1TestResult.insert(make_pair("ATTENDEE", "Example Attendee 1"));
        TextExample1TestResult.insert(make_pair("ATTENDEE", "Example Attendee 2"));
        TextExample1TestResult.insert(make_pair("ATTENDEE", "Example Attendee 3"));
        
        ASSERT_EQ(TextExample1TestResult, ProcessTextVectors(&TextPropertiesExample1, &TextValueExample1, true, "ATTENDEE"));
 
+       TextExample1TestResult.clear();
+       TextExample1TestResult.insert(make_pair("ATTENDEE", "Example Attendee 1"));
+
+       ASSERT_EQ(TextExample1TestResult, ProcessTextVectors(&TextPropertiesExample1, &TextValueExample1, false, "ATTENDEE"));
+
        TextExample1TestResult.clear();
        TextExample1TestResult.insert(make_pair("CATEGORIES", "CATEGORY 1"));
        TextExample1TestResult.insert(make_pair("CATEGORIES", "CATEGORY 2"));
@@ -95,4 +109,11 @@ TEST(CommonFunctions, ProcessTextVectorsTests){
 
        ASSERT_EQ(TextExample1TestResult, ProcessTextVectors(&TextPropertiesExample1, &TextValueExample1, true, "RESOURCES"));
 
+       TextExample1TestResult.clear();
+       TextExample1TestResult.insert(make_pair("RELATED;RELATION=NO", "First Relation"));
+       TextExample1TestResult.insert(make_pair("RELATED;RELATION=YES", "Second Relation"));
+       TextExample1TestResult.insert(make_pair("RELATED;RELATION=MAYBE", "Third Relation"));
+
+       ASSERT_EQ(TextExample1TestResult, ProcessTextVectors(&TextPropertiesExample1, &TextValueExample1, true, "RELATED"));
+
 }
\ 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