summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-09-12 06:38:23 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-09-14 10:42:18 (GMT)
commitba4292f83f92037fdd12b0f7413f628a4b2c7a22 (patch)
tree31c4f566b5a47e99789ed94702d87e39c53c71f5 /Swiften/Parser/PayloadParsers/UnitTest/SecurityLabelParserTest.cpp
parent234b140b5675c737859ed2457dcb07ad75a900ab (diff)
downloadswift-ba4292f83f92037fdd12b0f7413f628a4b2c7a22.zip
swift-ba4292f83f92037fdd12b0f7413f628a4b2c7a22.tar.bz2
Added more general PayloadsParserTester.
This tester also tests whether the PayloadParserFactory works properly.
Diffstat (limited to 'Swiften/Parser/PayloadParsers/UnitTest/SecurityLabelParserTest.cpp')
-rw-r--r--Swiften/Parser/PayloadParsers/UnitTest/SecurityLabelParserTest.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/SecurityLabelParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/SecurityLabelParserTest.cpp
index 325309f..8272bee 100644
--- a/Swiften/Parser/PayloadParsers/UnitTest/SecurityLabelParserTest.cpp
+++ b/Swiften/Parser/PayloadParsers/UnitTest/SecurityLabelParserTest.cpp
@@ -2,7 +2,7 @@
#include <cppunit/extensions/TestFactoryRegistry.h>
#include "Swiften/Parser/PayloadParsers/SecurityLabelParser.h"
-#include "Swiften/Parser/PayloadParsers/UnitTest/PayloadParserTester.h"
+#include "Swiften/Parser/PayloadParsers/UnitTest/PayloadsParserTester.h"
using namespace Swift;
@@ -16,8 +16,7 @@ class SecurityLabelParserTest : public CppUnit::TestFixture
SecurityLabelParserTest() {}
void testParse() {
- SecurityLabelParser testling;
- PayloadParserTester parser(&testling);
+ PayloadsParserTester parser;
CPPUNIT_ASSERT(parser.parse(
"<securitylabel xmlns=\"urn:xmpp:sec-label:0\">"
@@ -33,7 +32,7 @@ class SecurityLabelParserTest : public CppUnit::TestFixture
"</equivalentlabel>"
"</securitylabel>"));
- SecurityLabel* payload = dynamic_cast<SecurityLabel*>(testling.getPayload().get());
+ SecurityLabel* payload = dynamic_cast<SecurityLabel*>(parser.getPayload().get());
CPPUNIT_ASSERT_EQUAL(String("SECRET"), payload->getDisplayMarking());
CPPUNIT_ASSERT_EQUAL(String("black"), payload->getForegroundColor());
CPPUNIT_ASSERT_EQUAL(String("red"), payload->getBackgroundColor());