diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-09-12 06:38:23 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-09-14 10:42:18 (GMT) |
commit | ba4292f83f92037fdd12b0f7413f628a4b2c7a22 (patch) | |
tree | 31c4f566b5a47e99789ed94702d87e39c53c71f5 /Swiften/Parser/PayloadParsers/UnitTest/SecurityLabelsCatalogParserTest.cpp | |
parent | 234b140b5675c737859ed2457dcb07ad75a900ab (diff) | |
download | swift-contrib-ba4292f83f92037fdd12b0f7413f628a4b2c7a22.zip swift-contrib-ba4292f83f92037fdd12b0f7413f628a4b2c7a22.tar.bz2 |
Added more general PayloadsParserTester.
This tester also tests whether the PayloadParserFactory works properly.
Diffstat (limited to 'Swiften/Parser/PayloadParsers/UnitTest/SecurityLabelsCatalogParserTest.cpp')
-rw-r--r-- | Swiften/Parser/PayloadParsers/UnitTest/SecurityLabelsCatalogParserTest.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/SecurityLabelsCatalogParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/SecurityLabelsCatalogParserTest.cpp index 2f3f47a..b2378b6 100644 --- a/Swiften/Parser/PayloadParsers/UnitTest/SecurityLabelsCatalogParserTest.cpp +++ b/Swiften/Parser/PayloadParsers/UnitTest/SecurityLabelsCatalogParserTest.cpp @@ -2,7 +2,7 @@ #include <cppunit/extensions/TestFactoryRegistry.h> #include "Swiften/Parser/PayloadParsers/SecurityLabelsCatalogParser.h" -#include "Swiften/Parser/PayloadParsers/UnitTest/PayloadParserTester.h" +#include "Swiften/Parser/PayloadParsers/UnitTest/PayloadsParserTester.h" using namespace Swift; @@ -16,8 +16,7 @@ class SecurityLabelsCatalogParserTest : public CppUnit::TestFixture SecurityLabelsCatalogParserTest() {} void testParse() { - SecurityLabelsCatalogParser testling; - PayloadParserTester parser(&testling); + PayloadsParserTester parser; CPPUNIT_ASSERT(parser.parse( "<catalog desc=\"an example set of labels\" name=\"Default\" to=\"example.com\" xmlns=\"urn:xmpp:sec-label:catalog:0\">" @@ -31,7 +30,7 @@ class SecurityLabelsCatalogParserTest : public CppUnit::TestFixture "</securitylabel>" "</catalog>")); - SecurityLabelsCatalog* payload = dynamic_cast<SecurityLabelsCatalog*>(testling.getPayload().get()); + SecurityLabelsCatalog* payload = dynamic_cast<SecurityLabelsCatalog*>(parser.getPayload().get()); CPPUNIT_ASSERT_EQUAL(String("Default"), payload->getName()); CPPUNIT_ASSERT_EQUAL(String("an example set of labels"), payload->getDescription()); CPPUNIT_ASSERT_EQUAL(JID("example.com"), payload->getTo()); |