diff options
Diffstat (limited to 'Swiften/StreamStack/UnitTest')
-rw-r--r-- | Swiften/StreamStack/UnitTest/StreamStackTest.cpp | 320 | ||||
-rw-r--r-- | Swiften/StreamStack/UnitTest/XMPPLayerTest.cpp | 248 |
2 files changed, 282 insertions, 286 deletions
diff --git a/Swiften/StreamStack/UnitTest/StreamStackTest.cpp b/Swiften/StreamStack/UnitTest/StreamStackTest.cpp index 213948a..b074736 100644 --- a/Swiften/StreamStack/UnitTest/StreamStackTest.cpp +++ b/Swiften/StreamStack/UnitTest/StreamStackTest.cpp @@ -1,182 +1,176 @@ /* - * Copyright (c) 2010 Remko Tronçon - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. + * Copyright (c) 2010-2018 Isode Limited. + * All rights reserved. + * See the COPYING file for more information. */ -#include <Swiften/Base/ByteArray.h> -#include <QA/Checker/IO.h> - +#include <memory> #include <vector> + #include <boost/bind.hpp> -#include <boost/smart_ptr.hpp> + +#include <QA/Checker/IO.h> + #include <cppunit/extensions/HelperMacros.h> #include <cppunit/extensions/TestFactoryRegistry.h> #include <Swiften/Base/ByteArray.h> #include <Swiften/Base/Concat.h> -#include <Swiften/StreamStack/StreamStack.h> -#include <Swiften/StreamStack/LowLayer.h> -#include <Swiften/StreamStack/XMPPLayer.h> -#include <Swiften/StreamStack/StreamLayer.h> -#include <Swiften/Parser/PlatformXMLParserFactory.h> #include <Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.h> +#include <Swiften/Parser/PlatformXMLParserFactory.h> #include <Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.h> +#include <Swiften/StreamStack/LowLayer.h> +#include <Swiften/StreamStack/StreamLayer.h> +#include <Swiften/StreamStack/StreamStack.h> +#include <Swiften/StreamStack/XMPPLayer.h> using namespace Swift; class StreamStackTest : public CppUnit::TestFixture { - CPPUNIT_TEST_SUITE(StreamStackTest); - CPPUNIT_TEST(testWriteData_NoIntermediateStreamStack); - CPPUNIT_TEST(testWriteData_OneIntermediateStream); - CPPUNIT_TEST(testWriteData_TwoIntermediateStreamStack); - CPPUNIT_TEST(testReadData_NoIntermediateStreamStack); - CPPUNIT_TEST(testReadData_OneIntermediateStream); - CPPUNIT_TEST(testReadData_TwoIntermediateStreamStack); - CPPUNIT_TEST(testAddLayer_ExistingOnWriteDataSlot); - CPPUNIT_TEST_SUITE_END(); - - public: - void setUp() { - physicalStream_ = new TestLowLayer(); - xmppStream_ = new XMPPLayer(&parserFactories_, &serializers_, &xmlParserFactory_, ClientStreamType); - elementsReceived_ = 0; - dataWriteReceived_ = 0; - } - - void tearDown() { - delete physicalStream_; - delete xmppStream_; - } - - void testWriteData_NoIntermediateStreamStack() { - StreamStack testling(xmppStream_, physicalStream_); - - xmppStream_->writeData("foo"); - - CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), physicalStream_->data_.size()); - CPPUNIT_ASSERT_EQUAL(createSafeByteArray("foo"), physicalStream_->data_[0]); - } - - void testWriteData_OneIntermediateStream() { - StreamStack testling(xmppStream_, physicalStream_); - boost::shared_ptr<MyStreamLayer> xStream(new MyStreamLayer("X")); - testling.addLayer(xStream.get()); - - xmppStream_->writeData("foo"); - - CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), physicalStream_->data_.size()); - CPPUNIT_ASSERT_EQUAL(createSafeByteArray("Xfoo"), physicalStream_->data_[0]); - } - - void testWriteData_TwoIntermediateStreamStack() { - StreamStack testling(xmppStream_, physicalStream_); - boost::shared_ptr<MyStreamLayer> xStream(new MyStreamLayer("X")); - boost::shared_ptr<MyStreamLayer> yStream(new MyStreamLayer("Y")); - testling.addLayer(xStream.get()); - testling.addLayer(yStream.get()); - - xmppStream_->writeData("foo"); - - CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), physicalStream_->data_.size()); - CPPUNIT_ASSERT_EQUAL(createSafeByteArray("XYfoo"), physicalStream_->data_[0]); - } - - void testReadData_NoIntermediateStreamStack() { - StreamStack testling(xmppStream_, physicalStream_); - xmppStream_->onElement.connect(boost::bind(&StreamStackTest::handleElement, this, _1)); - - physicalStream_->onDataRead(createSafeByteArray("<stream:stream xmlns:stream='http://etherx.jabber.org/streams'><presence/>")); - - CPPUNIT_ASSERT_EQUAL(1, elementsReceived_); - } - - void testReadData_OneIntermediateStream() { - StreamStack testling(xmppStream_, physicalStream_); - xmppStream_->onElement.connect(boost::bind(&StreamStackTest::handleElement, this, _1)); - boost::shared_ptr<MyStreamLayer> xStream(new MyStreamLayer("<")); - testling.addLayer(xStream.get()); - - physicalStream_->onDataRead(createSafeByteArray("stream:stream xmlns:stream='http://etherx.jabber.org/streams'><presence/>")); - - CPPUNIT_ASSERT_EQUAL(1, elementsReceived_); - } - - void testReadData_TwoIntermediateStreamStack() { - StreamStack testling(xmppStream_, physicalStream_); - xmppStream_->onElement.connect(boost::bind(&StreamStackTest::handleElement, this, _1)); - boost::shared_ptr<MyStreamLayer> xStream(new MyStreamLayer("s")); - boost::shared_ptr<MyStreamLayer> yStream(new MyStreamLayer("<")); - testling.addLayer(xStream.get()); - testling.addLayer(yStream.get()); - - physicalStream_->onDataRead(createSafeByteArray("tream:stream xmlns:stream='http://etherx.jabber.org/streams'><presence/>")); - - CPPUNIT_ASSERT_EQUAL(1, elementsReceived_); - } - - void testAddLayer_ExistingOnWriteDataSlot() { - StreamStack testling(xmppStream_, physicalStream_); - xmppStream_->onWriteData.connect(boost::bind(&StreamStackTest::handleWriteData, this, _1)); - boost::shared_ptr<MyStreamLayer> xStream(new MyStreamLayer("X")); - testling.addLayer(xStream.get()); - - xmppStream_->writeData("foo"); - - CPPUNIT_ASSERT_EQUAL(1, dataWriteReceived_); - } - - void handleElement(boost::shared_ptr<Element>) { - ++elementsReceived_; - } - - void handleWriteData(const SafeByteArray&) { - ++dataWriteReceived_; - } - - private: - class MyStreamLayer : public StreamLayer { - public: - MyStreamLayer(const std::string& prepend) : prepend_(prepend) { - } - - virtual void writeData(const SafeByteArray& data) { - writeDataToChildLayer(concat(createSafeByteArray(prepend_), data)); - } - - virtual void handleDataRead(const SafeByteArray& data) { - writeDataToParentLayer(concat(createSafeByteArray(prepend_), data)); - } - - private: - std::string prepend_; - }; - - class TestLowLayer : public LowLayer { - public: - TestLowLayer() { - } - - virtual void writeData(const SafeByteArray& data) { - data_.push_back(data); - } - - void onDataRead(const SafeByteArray& data) { - writeDataToParentLayer(data); - } - - std::vector<SafeByteArray> data_; - }; - - - private: - FullPayloadParserFactoryCollection parserFactories_; - FullPayloadSerializerCollection serializers_; - TestLowLayer* physicalStream_; - PlatformXMLParserFactory xmlParserFactory_; - XMPPLayer* xmppStream_; - int elementsReceived_; - int dataWriteReceived_; + CPPUNIT_TEST_SUITE(StreamStackTest); + CPPUNIT_TEST(testWriteData_NoIntermediateStreamStack); + CPPUNIT_TEST(testWriteData_OneIntermediateStream); + CPPUNIT_TEST(testWriteData_TwoIntermediateStreamStack); + CPPUNIT_TEST(testReadData_NoIntermediateStreamStack); + CPPUNIT_TEST(testReadData_OneIntermediateStream); + CPPUNIT_TEST(testReadData_TwoIntermediateStreamStack); + CPPUNIT_TEST(testAddLayer_ExistingOnWriteDataSlot); + CPPUNIT_TEST_SUITE_END(); + + public: + void setUp() { + testling_ = std::make_unique<StreamStack>(std::make_unique<XMPPLayer>(&parserFactories_, &serializers_, &xmlParserFactory_, ClientStreamType), std::make_unique<TestLowLayer>()); + physicalStream_ = testling_->getLayer<TestLowLayer>(); + xmppStream_ = testling_->getLayer<XMPPLayer>(); + elementsReceived_ = 0; + dataWriteReceived_ = 0; + } + + void tearDown() { + } + + void testWriteData_NoIntermediateStreamStack() { + + xmppStream_->writeData("foo"); + + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), physicalStream_->data_.size()); + CPPUNIT_ASSERT_EQUAL(createSafeByteArray("foo"), physicalStream_->data_[0]); + } + + void testWriteData_OneIntermediateStream() { + std::unique_ptr<MyStreamLayer> xStream(new MyStreamLayer("X")); + testling_->addLayer(std::move(xStream)); + + xmppStream_->writeData("foo"); + + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), physicalStream_->data_.size()); + CPPUNIT_ASSERT_EQUAL(createSafeByteArray("Xfoo"), physicalStream_->data_[0]); + } + + void testWriteData_TwoIntermediateStreamStack() { + std::unique_ptr<MyStreamLayer> xStream(new MyStreamLayer("X")); + std::unique_ptr<MyStreamLayer> yStream(new MyStreamLayer("Y")); + testling_->addLayer(std::move(xStream)); + testling_->addLayer(std::move(yStream)); + + xmppStream_->writeData("foo"); + + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), physicalStream_->data_.size()); + CPPUNIT_ASSERT_EQUAL(createSafeByteArray("XYfoo"), physicalStream_->data_[0]); + } + + void testReadData_NoIntermediateStreamStack() { + xmppStream_->onElement.connect(boost::bind(&StreamStackTest::handleElement, this, _1)); + + physicalStream_->onDataRead(createSafeByteArray("<stream:stream xmlns:stream='http://etherx.jabber.org/streams'><presence/>")); + + CPPUNIT_ASSERT_EQUAL(1, elementsReceived_); + } + + void testReadData_OneIntermediateStream() { + xmppStream_->onElement.connect(boost::bind(&StreamStackTest::handleElement, this, _1)); + std::unique_ptr<MyStreamLayer> xStream(new MyStreamLayer("<")); + testling_->addLayer(std::move(xStream)); + + physicalStream_->onDataRead(createSafeByteArray("stream:stream xmlns:stream='http://etherx.jabber.org/streams'><presence/>")); + + CPPUNIT_ASSERT_EQUAL(1, elementsReceived_); + } + + void testReadData_TwoIntermediateStreamStack() { + xmppStream_->onElement.connect(boost::bind(&StreamStackTest::handleElement, this, _1)); + std::unique_ptr<MyStreamLayer> xStream(new MyStreamLayer("s")); + std::unique_ptr<MyStreamLayer> yStream(new MyStreamLayer("<")); + testling_->addLayer(std::move(xStream)); + testling_->addLayer(std::move(yStream)); + + physicalStream_->onDataRead(createSafeByteArray("tream:stream xmlns:stream='http://etherx.jabber.org/streams'><presence/>")); + + CPPUNIT_ASSERT_EQUAL(1, elementsReceived_); + } + + void testAddLayer_ExistingOnWriteDataSlot() { + xmppStream_->onWriteData.connect(boost::bind(&StreamStackTest::handleWriteData, this, _1)); + std::unique_ptr<MyStreamLayer> xStream(new MyStreamLayer("X")); + testling_->addLayer(std::move(xStream)); + + xmppStream_->writeData("foo"); + + CPPUNIT_ASSERT_EQUAL(1, dataWriteReceived_); + } + + void handleElement(std::shared_ptr<ToplevelElement>) { + ++elementsReceived_; + } + + void handleWriteData(const SafeByteArray&) { + ++dataWriteReceived_; + } + + private: + class MyStreamLayer : public StreamLayer { + public: + MyStreamLayer(const std::string& prepend) : prepend_(prepend) { + } + + virtual void writeData(const SafeByteArray& data) { + writeDataToChildLayer(concat(createSafeByteArray(prepend_), data)); + } + + virtual void handleDataRead(const SafeByteArray& data) { + writeDataToParentLayer(concat(createSafeByteArray(prepend_), data)); + } + + private: + std::string prepend_; + }; + + class TestLowLayer : public LowLayer { + public: + TestLowLayer() { + } + + virtual void writeData(const SafeByteArray& data) { + data_.push_back(data); + } + + void onDataRead(const SafeByteArray& data) { + writeDataToParentLayer(data); + } + + std::vector<SafeByteArray> data_; + }; + + + private: + FullPayloadParserFactoryCollection parserFactories_; + FullPayloadSerializerCollection serializers_; + TestLowLayer* physicalStream_; + PlatformXMLParserFactory xmlParserFactory_; + XMPPLayer* xmppStream_; + std::unique_ptr<StreamStack> testling_; + int elementsReceived_; + int dataWriteReceived_; }; CPPUNIT_TEST_SUITE_REGISTRATION(StreamStackTest); diff --git a/Swiften/StreamStack/UnitTest/XMPPLayerTest.cpp b/Swiften/StreamStack/UnitTest/XMPPLayerTest.cpp index a6098f1..6d1d537 100644 --- a/Swiften/StreamStack/UnitTest/XMPPLayerTest.cpp +++ b/Swiften/StreamStack/UnitTest/XMPPLayerTest.cpp @@ -1,141 +1,143 @@ /* - * Copyright (c) 2010 Remko Tronçon - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. + * Copyright (c) 2010-2016 Isode Limited. + * All rights reserved. + * See the COPYING file for more information. */ #include <vector> + #include <boost/bind.hpp> + #include <cppunit/extensions/HelperMacros.h> #include <cppunit/extensions/TestFactoryRegistry.h> -#include <Swiften/Elements/ProtocolHeader.h> -#include <Swiften/Elements/Presence.h> #include <Swiften/Base/ByteArray.h> -#include <Swiften/StreamStack/XMPPLayer.h> -#include <Swiften/StreamStack/LowLayer.h> -#include <Swiften/Parser/PlatformXMLParserFactory.h> +#include <Swiften/Elements/Presence.h> +#include <Swiften/Elements/ProtocolHeader.h> #include <Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.h> +#include <Swiften/Parser/PlatformXMLParserFactory.h> #include <Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.h> +#include <Swiften/StreamStack/LowLayer.h> +#include <Swiften/StreamStack/XMPPLayer.h> using namespace Swift; class XMPPLayerTest : public CppUnit::TestFixture { - CPPUNIT_TEST_SUITE(XMPPLayerTest); - CPPUNIT_TEST(testParseData_Error); - CPPUNIT_TEST(testResetParser); - CPPUNIT_TEST(testResetParser_FromSlot); - CPPUNIT_TEST(testWriteHeader); - CPPUNIT_TEST(testWriteElement); - CPPUNIT_TEST(testWriteFooter); - CPPUNIT_TEST_SUITE_END(); - - public: - void setUp() { - lowLayer_ = new DummyLowLayer(); - testling_ = new XMPPLayerExposed(&parserFactories_, &serializers_, &xmlParserFactory_, ClientStreamType); - testling_->setChildLayer(lowLayer_); - elementsReceived_ = 0; - errorReceived_ = 0; - } - - void tearDown() { - delete testling_; - delete lowLayer_; - } - - void testParseData_Error() { - testling_->onError.connect(boost::bind(&XMPPLayerTest::handleError, this)); - - testling_->handleDataRead(createSafeByteArray("<iq>")); - - CPPUNIT_ASSERT_EQUAL(1, errorReceived_); - } - - void testResetParser() { - testling_->onElement.connect(boost::bind(&XMPPLayerTest::handleElement, this, _1)); - testling_->onError.connect(boost::bind(&XMPPLayerTest::handleError, this)); - - testling_->handleDataRead(createSafeByteArray("<stream:stream to=\"example.com\" xmlns=\"jabber:client\" xmlns:stream=\"http://etherx.jabber.org/streams\" >")); - testling_->resetParser(); - testling_->handleDataRead(createSafeByteArray("<stream:stream to=\"example.com\" xmlns=\"jabber:client\" xmlns:stream=\"http://etherx.jabber.org/streams\" >")); - testling_->handleDataRead(createSafeByteArray("<presence/>")); - - CPPUNIT_ASSERT_EQUAL(1, elementsReceived_); - CPPUNIT_ASSERT_EQUAL(0, errorReceived_); - } - - void testResetParser_FromSlot() { - testling_->onElement.connect(boost::bind(&XMPPLayerTest::handleElementAndReset, this, _1)); - testling_->handleDataRead(createSafeByteArray("<stream:stream to=\"example.com\" xmlns=\"jabber:client\" xmlns:stream=\"http://etherx.jabber.org/streams\" ><presence/>")); - testling_->handleDataRead(createSafeByteArray("<stream:stream to=\"example.com\" xmlns=\"jabber:client\" xmlns:stream=\"http://etherx.jabber.org/streams\" ><presence/>")); - - CPPUNIT_ASSERT_EQUAL(2, elementsReceived_); - CPPUNIT_ASSERT_EQUAL(0, errorReceived_); - } - - void testWriteHeader() { - ProtocolHeader header; - header.setTo("example.com"); - testling_->writeHeader(header); - - CPPUNIT_ASSERT_EQUAL(std::string("<?xml version=\"1.0\"?><stream:stream xmlns=\"jabber:client\" xmlns:stream=\"http://etherx.jabber.org/streams\" to=\"example.com\" version=\"1.0\">"), lowLayer_->writtenData); - } - - void testWriteElement() { - testling_->writeElement(boost::make_shared<Presence>()); - - CPPUNIT_ASSERT_EQUAL(std::string("<presence/>"), lowLayer_->writtenData); - } - - void testWriteFooter() { - testling_->writeFooter(); - - CPPUNIT_ASSERT_EQUAL(std::string("</stream:stream>"), lowLayer_->writtenData); - } - - void handleElement(boost::shared_ptr<Element>) { - ++elementsReceived_; - } - - void handleElementAndReset(boost::shared_ptr<Element>) { - ++elementsReceived_; - testling_->resetParser(); - } - - void handleError() { - ++errorReceived_; - } - - private: - class XMPPLayerExposed : public XMPPLayer { - public: - XMPPLayerExposed( - PayloadParserFactoryCollection* payloadParserFactories, - PayloadSerializerCollection* payloadSerializers, - XMLParserFactory* xmlParserFactory, - StreamType streamType) : XMPPLayer(payloadParserFactories, payloadSerializers, xmlParserFactory, streamType) {} - - using XMPPLayer::handleDataRead; - using HighLayer::setChildLayer; - }; - - class DummyLowLayer : public LowLayer { - public: - virtual void writeData(const SafeByteArray& data) { - writtenData += byteArrayToString(ByteArray(data.begin(), data.end())); - } - - std::string writtenData; - }; - - FullPayloadParserFactoryCollection parserFactories_; - FullPayloadSerializerCollection serializers_; - DummyLowLayer* lowLayer_; - XMPPLayerExposed* testling_; - PlatformXMLParserFactory xmlParserFactory_; - int elementsReceived_; - int errorReceived_; + CPPUNIT_TEST_SUITE(XMPPLayerTest); + CPPUNIT_TEST(testParseData_Error); + CPPUNIT_TEST(testResetParser); + CPPUNIT_TEST(testResetParser_FromSlot); + CPPUNIT_TEST(testWriteHeader); + CPPUNIT_TEST(testWriteElement); + CPPUNIT_TEST(testWriteFooter); + CPPUNIT_TEST_SUITE_END(); + + public: + void setUp() { + lowLayer_ = new DummyLowLayer(); + testling_ = new XMPPLayerExposed(&parserFactories_, &serializers_, &xmlParserFactory_, ClientStreamType); + testling_->setChildLayer(lowLayer_); + elementsReceived_ = 0; + errorReceived_ = 0; + } + + void tearDown() { + delete testling_; + delete lowLayer_; + } + + void testParseData_Error() { + testling_->onError.connect(boost::bind(&XMPPLayerTest::handleError, this)); + + testling_->handleDataRead(createSafeByteArray("<iq>")); + + CPPUNIT_ASSERT_EQUAL(1, errorReceived_); + } + + void testResetParser() { + testling_->onElement.connect(boost::bind(&XMPPLayerTest::handleElement, this, _1)); + testling_->onError.connect(boost::bind(&XMPPLayerTest::handleError, this)); + + testling_->handleDataRead(createSafeByteArray("<stream:stream to=\"example.com\" xmlns=\"jabber:client\" xmlns:stream=\"http://etherx.jabber.org/streams\" >")); + testling_->resetParser(); + testling_->handleDataRead(createSafeByteArray("<stream:stream to=\"example.com\" xmlns=\"jabber:client\" xmlns:stream=\"http://etherx.jabber.org/streams\" >")); + testling_->handleDataRead(createSafeByteArray("<presence/>")); + + CPPUNIT_ASSERT_EQUAL(1, elementsReceived_); + CPPUNIT_ASSERT_EQUAL(0, errorReceived_); + } + + void testResetParser_FromSlot() { + testling_->onElement.connect(boost::bind(&XMPPLayerTest::handleElementAndReset, this, _1)); + testling_->handleDataRead(createSafeByteArray("<stream:stream to=\"example.com\" xmlns=\"jabber:client\" xmlns:stream=\"http://etherx.jabber.org/streams\" ><presence/>")); + testling_->handleDataRead(createSafeByteArray("<stream:stream to=\"example.com\" xmlns=\"jabber:client\" xmlns:stream=\"http://etherx.jabber.org/streams\" ><presence/>")); + + CPPUNIT_ASSERT_EQUAL(2, elementsReceived_); + CPPUNIT_ASSERT_EQUAL(0, errorReceived_); + } + + void testWriteHeader() { + ProtocolHeader header; + header.setTo("example.com"); + testling_->writeHeader(header); + + CPPUNIT_ASSERT_EQUAL(std::string("<?xml version=\"1.0\"?><stream:stream xmlns=\"jabber:client\" xmlns:stream=\"http://etherx.jabber.org/streams\" to=\"example.com\" version=\"1.0\">"), lowLayer_->writtenData); + } + + void testWriteElement() { + testling_->writeElement(std::make_shared<Presence>()); + + CPPUNIT_ASSERT_EQUAL(std::string("<presence/>"), lowLayer_->writtenData); + } + + void testWriteFooter() { + testling_->writeFooter(); + + CPPUNIT_ASSERT_EQUAL(std::string("</stream:stream>"), lowLayer_->writtenData); + } + + void handleElement(std::shared_ptr<ToplevelElement>) { + ++elementsReceived_; + } + + void handleElementAndReset(std::shared_ptr<ToplevelElement>) { + ++elementsReceived_; + testling_->resetParser(); + } + + void handleError() { + ++errorReceived_; + } + + private: + class XMPPLayerExposed : public XMPPLayer { + public: + XMPPLayerExposed( + PayloadParserFactoryCollection* payloadParserFactories, + PayloadSerializerCollection* payloadSerializers, + XMLParserFactory* xmlParserFactory, + StreamType streamType) : XMPPLayer(payloadParserFactories, payloadSerializers, xmlParserFactory, streamType) {} + + using XMPPLayer::handleDataRead; + using HighLayer::setChildLayer; + }; + + class DummyLowLayer : public LowLayer { + public: + virtual void writeData(const SafeByteArray& data) { + writtenData += byteArrayToString(ByteArray(data.begin(), data.end())); + } + + std::string writtenData; + }; + + FullPayloadParserFactoryCollection parserFactories_; + FullPayloadSerializerCollection serializers_; + DummyLowLayer* lowLayer_; + XMPPLayerExposed* testling_; + PlatformXMLParserFactory xmlParserFactory_; + int elementsReceived_; + int errorReceived_; }; CPPUNIT_TEST_SUITE_REGISTRATION(XMPPLayerTest); |