Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added SplitValuesTests and SplitNameValueTests
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sat, 23 Jan 2016 20:50:00 +0000 (20:50 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sat, 23 Jan 2016 20:50:00 +0000 (20:50 +0000)
source/tests/xestiacalendar_commonfunctions.h

index ca7269b..a332228 100644 (file)
@@ -153,4 +153,30 @@ TEST(CommonFunctions, ProcessTextVectorsTests){
 
        ASSERT_EQ(TextExample1TestResult, ProcessTextVectors(&TextPropertiesExample1, &TextValueExample1, false, "RELATED"));
 
+}
+
+TEST(CommonFunctions, SplitValuesTests){
+       
+       map<string, string> TextExample1TestResult;
+       
+       TextExample1TestResult.insert(make_pair("RELATION", "NO"));
+       TextExample1TestResult.insert(make_pair("TEST", "YES"));
+       TextExample1TestResult.insert(make_pair("DATA", "SOMEDATA"));
+       
+       ASSERT_EQ(TextExample1TestResult, SplitValues("TEST;RELATION=NO;TEST=YES;DATA=SOMEDATA"));
+       
+}
+
+TEST(CommonFunctions, SplitNameValueTests){
+       
+       PropertyNameValue NameValueResult;
+               
+       NameValueResult = SplitNameValue("TEST=OK");
+       
+       string PropertyName = NameValueResult.Name;
+       string PropertyValue = NameValueResult.Value;
+       
+       ASSERT_EQ(PropertyName, "TEST");
+       ASSERT_EQ(PropertyValue, "OK");
+       
 }
\ 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