X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Ftests%2Fxestiacalendar_commonfunctions.h;h=a332228d6d6410eb0f1710b133a943c88672b2e0;hb=00dff59febad28b9588ceca2aa8cde1d0438971f;hp=ca7269b58345aaa36b26b1d7704bea0964fe1996;hpb=c3a43f492e9eb3003693d165a8c057b2a89f9d64;p=xestiacalendar%2F.git diff --git a/source/tests/xestiacalendar_commonfunctions.h b/source/tests/xestiacalendar_commonfunctions.h index ca7269b..a332228 100644 --- a/source/tests/xestiacalendar_commonfunctions.h +++ b/source/tests/xestiacalendar_commonfunctions.h @@ -153,4 +153,30 @@ TEST(CommonFunctions, ProcessTextVectorsTests){ ASSERT_EQ(TextExample1TestResult, ProcessTextVectors(&TextPropertiesExample1, &TextValueExample1, false, "RELATED")); +} + +TEST(CommonFunctions, SplitValuesTests){ + + map 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