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/BodyParserTest.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/BodyParserTest.cpp')
-rw-r--r--Swiften/Parser/PayloadParsers/UnitTest/BodyParserTest.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/BodyParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/BodyParserTest.cpp
index c747452..2fc6180 100644
--- a/Swiften/Parser/PayloadParsers/UnitTest/BodyParserTest.cpp
+++ b/Swiften/Parser/PayloadParsers/UnitTest/BodyParserTest.cpp
@@ -2,7 +2,7 @@
#include <cppunit/extensions/TestFactoryRegistry.h>
#include "Swiften/Parser/PayloadParsers/BodyParser.h"
-#include "Swiften/Parser/PayloadParsers/UnitTest/PayloadParserTester.h"
+#include "Swiften/Parser/PayloadParsers/UnitTest/PayloadsParserTester.h"
using namespace Swift;
@@ -16,12 +16,11 @@ class BodyParserTest : public CppUnit::TestFixture
BodyParserTest() {}
void testParse() {
- BodyParser testling;
- PayloadParserTester parser(&testling);
+ PayloadsParserTester parser;
CPPUNIT_ASSERT(parser.parse("<body>foo<baz>bar</baz>fum</body>"));
- Body* payload = dynamic_cast<Body*>(testling.getPayload().get());
+ Body* payload = dynamic_cast<Body*>(parser.getPayload().get());
CPPUNIT_ASSERT_EQUAL(String("foobarfum"), payload->getText());
}
};