summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Parser/PayloadParsers/UnitTest/DiscoItemsParserTest.cpp')
-rw-r--r--Swiften/Parser/PayloadParsers/UnitTest/DiscoItemsParserTest.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/DiscoItemsParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/DiscoItemsParserTest.cpp
index ee234ad..01db978 100644
--- a/Swiften/Parser/PayloadParsers/UnitTest/DiscoItemsParserTest.cpp
+++ b/Swiften/Parser/PayloadParsers/UnitTest/DiscoItemsParserTest.cpp
@@ -13,30 +13,30 @@
using namespace Swift;
class DiscoItemsParserTest : public CppUnit::TestFixture {
- CPPUNIT_TEST_SUITE(DiscoItemsParserTest);
- CPPUNIT_TEST(testParse);
- CPPUNIT_TEST_SUITE_END();
-
- public:
- void testParse() {
- PayloadsParserTester parser;
-
- CPPUNIT_ASSERT(parser.parse(
- "<query xmlns='http://jabber.org/protocol/disco#items' node='http://jabber.org/protocol/commands'>"
- "<item jid='responder@domain' node='list' name='List Service Configurations'/>"
- "<item jid='responder@domain' node='config' name='Configure Service'/>"
- "</query>"));
-
- boost::shared_ptr<DiscoItems> payload = boost::dynamic_pointer_cast<DiscoItems>(parser.getPayload());
- CPPUNIT_ASSERT_EQUAL(2, static_cast<int>(payload->getItems().size()));
- CPPUNIT_ASSERT_EQUAL(std::string("List Service Configurations"), payload->getItems()[0].getName());
- CPPUNIT_ASSERT_EQUAL(std::string("list"), payload->getItems()[0].getNode());
- CPPUNIT_ASSERT_EQUAL(std::string("responder@domain"), payload->getItems()[0].getJID().toString());
- CPPUNIT_ASSERT_EQUAL(std::string("Configure Service"), payload->getItems()[1].getName());
- CPPUNIT_ASSERT_EQUAL(std::string("config"), payload->getItems()[1].getNode());
- CPPUNIT_ASSERT_EQUAL(std::string("responder@domain"), payload->getItems()[1].getJID().toString());
- CPPUNIT_ASSERT_EQUAL(std::string("http://jabber.org/protocol/commands"), payload->getNode());
- }
+ CPPUNIT_TEST_SUITE(DiscoItemsParserTest);
+ CPPUNIT_TEST(testParse);
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+ void testParse() {
+ PayloadsParserTester parser;
+
+ CPPUNIT_ASSERT(parser.parse(
+ "<query xmlns='http://jabber.org/protocol/disco#items' node='http://jabber.org/protocol/commands'>"
+ "<item jid='responder@domain' node='list' name='List Service Configurations'/>"
+ "<item jid='responder@domain' node='config' name='Configure Service'/>"
+ "</query>"));
+
+ boost::shared_ptr<DiscoItems> payload = boost::dynamic_pointer_cast<DiscoItems>(parser.getPayload());
+ CPPUNIT_ASSERT_EQUAL(2, static_cast<int>(payload->getItems().size()));
+ CPPUNIT_ASSERT_EQUAL(std::string("List Service Configurations"), payload->getItems()[0].getName());
+ CPPUNIT_ASSERT_EQUAL(std::string("list"), payload->getItems()[0].getNode());
+ CPPUNIT_ASSERT_EQUAL(std::string("responder@domain"), payload->getItems()[0].getJID().toString());
+ CPPUNIT_ASSERT_EQUAL(std::string("Configure Service"), payload->getItems()[1].getName());
+ CPPUNIT_ASSERT_EQUAL(std::string("config"), payload->getItems()[1].getNode());
+ CPPUNIT_ASSERT_EQUAL(std::string("responder@domain"), payload->getItems()[1].getJID().toString());
+ CPPUNIT_ASSERT_EQUAL(std::string("http://jabber.org/protocol/commands"), payload->getNode());
+ }
};