/* * Copyright (c) 2014 Kevin Smith and Remko Tronçon * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ #include #include #include #include #include using namespace Swift; class MAMArchivedParserTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(MAMArchivedParserTest); CPPUNIT_TEST(testParse); CPPUNIT_TEST_SUITE_END(); public: void testParse() { PayloadsParserTester parser; CPPUNIT_ASSERT(parser.parse( "")); boost::shared_ptr payload = parser.getPayload(); CPPUNIT_ASSERT(!!payload); CPPUNIT_ASSERT_EQUAL(JID("juliet@capulet.lit"), payload->getBy()); CPPUNIT_ASSERT_EQUAL(std::string("28482-98726-73623"), payload->getID()); } }; CPPUNIT_TEST_SUITE_REGISTRATION(MAMArchivedParserTest);