summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-05-08 15:11:22 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-05-08 15:11:22 (GMT)
commit52bd37a759acc7edbd616c745ff64ac70ae41b9c (patch)
tree2493313586ad930256ebae1d49a369af00b42089 /Swiften/SASL/UnitTest
parent85c1484a546d484819254230319f9ff09169aa9b (diff)
downloadswift-52bd37a759acc7edbd616c745ff64ac70ae41b9c.zip
swift-52bd37a759acc7edbd616c745ff64ac70ae41b9c.tar.bz2
Added DIGESTMD5Properties parsing.
Diffstat (limited to 'Swiften/SASL/UnitTest')
-rw-r--r--Swiften/SASL/UnitTest/DIGESTMD5PropertiesTest.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/Swiften/SASL/UnitTest/DIGESTMD5PropertiesTest.cpp b/Swiften/SASL/UnitTest/DIGESTMD5PropertiesTest.cpp
index 0c1543a..1b2c121 100644
--- a/Swiften/SASL/UnitTest/DIGESTMD5PropertiesTest.cpp
+++ b/Swiften/SASL/UnitTest/DIGESTMD5PropertiesTest.cpp
@@ -21,7 +21,16 @@ class DIGESTMD5PropertiesTest : public CppUnit::TestFixture {
void testParse() {
DIGESTMD5Properties properties = DIGESTMD5Properties::parse(ByteArray(
"realm=\"myrealm1\",realm=\"myrealm2\",nonce=\"mynonce\","
- "algorithm=\"md5-sess\""));
+ "algorithm=md5-sess,charset=utf-8"));
+
+ CPPUNIT_ASSERT(properties.getValue("realm"));
+ CPPUNIT_ASSERT_EQUAL(String("myrealm1"), *properties.getValue("realm"));
+ CPPUNIT_ASSERT(properties.getValue("nonce"));
+ CPPUNIT_ASSERT_EQUAL(String("mynonce"), *properties.getValue("nonce"));
+ CPPUNIT_ASSERT(properties.getValue("algorithm"));
+ CPPUNIT_ASSERT_EQUAL(String("md5-sess"), *properties.getValue("algorithm"));
+ CPPUNIT_ASSERT(properties.getValue("charset"));
+ CPPUNIT_ASSERT_EQUAL(String("utf-8"), *properties.getValue("charset"));
}
void testSerialize() {