diff options
Diffstat (limited to 'Swiften/Parser/PayloadParsers/UnitTest')
-rw-r--r-- | Swiften/Parser/PayloadParsers/UnitTest/PrivateStorageParserTest.cpp | 6 | ||||
-rw-r--r-- | Swiften/Parser/PayloadParsers/UnitTest/StorageParserTest.cpp | 34 |
2 files changed, 20 insertions, 20 deletions
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/PrivateStorageParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/PrivateStorageParserTest.cpp index b30b204..0fe58e0 100644 --- a/Swiften/Parser/PayloadParsers/UnitTest/PrivateStorageParserTest.cpp +++ b/Swiften/Parser/PayloadParsers/UnitTest/PrivateStorageParserTest.cpp @@ -40,8 +40,8 @@ class PrivateStorageParserTest : public CppUnit::TestFixture { CPPUNIT_ASSERT(payload); boost::shared_ptr<Storage> storage = boost::dynamic_pointer_cast<Storage>(payload->getPayload()); CPPUNIT_ASSERT(storage); - CPPUNIT_ASSERT_EQUAL(String("Alice"), storage->getConferences()[0].nick); - CPPUNIT_ASSERT_EQUAL(JID("swift@rooms.swift.im"), storage->getConferences()[0].jid); + CPPUNIT_ASSERT_EQUAL(String("Alice"), storage->getRooms()[0].nick); + CPPUNIT_ASSERT_EQUAL(JID("swift@rooms.swift.im"), storage->getRooms()[0].jid); } void testParse_NoPayload() { @@ -75,7 +75,7 @@ class PrivateStorageParserTest : public CppUnit::TestFixture { CPPUNIT_ASSERT(payload); boost::shared_ptr<Storage> storage = boost::dynamic_pointer_cast<Storage>(payload->getPayload()); CPPUNIT_ASSERT(storage); - CPPUNIT_ASSERT_EQUAL(String("Rabbit"), storage->getConferences()[0].nick); + CPPUNIT_ASSERT_EQUAL(String("Rabbit"), storage->getRooms()[0].nick); } void testParse_UnsupportedPayload() { diff --git a/Swiften/Parser/PayloadParsers/UnitTest/StorageParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/StorageParserTest.cpp index 03dc144..cad3b5c 100644 --- a/Swiften/Parser/PayloadParsers/UnitTest/StorageParserTest.cpp +++ b/Swiften/Parser/PayloadParsers/UnitTest/StorageParserTest.cpp @@ -14,15 +14,15 @@ using namespace Swift; class StorageParserTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(StorageParserTest); - CPPUNIT_TEST(testParse_Conference); - CPPUNIT_TEST(testParse_MultipleConferences); + CPPUNIT_TEST(testParse_Room); + CPPUNIT_TEST(testParse_MultipleRooms); CPPUNIT_TEST(testParse_URL); CPPUNIT_TEST_SUITE_END(); public: StorageParserTest() {} - void testParse_Conference() { + void testParse_Room() { PayloadsParserTester parser; CPPUNIT_ASSERT(parser.parse( @@ -36,16 +36,16 @@ class StorageParserTest : public CppUnit::TestFixture { "</storage>")); Storage* payload = dynamic_cast<Storage*>(parser.getPayload().get()); - std::vector<Storage::Conference> conferences = payload->getConferences(); - CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(conferences.size())); - CPPUNIT_ASSERT_EQUAL(String("Council of Oberon"), conferences[0].name); - CPPUNIT_ASSERT_EQUAL(JID("council@conference.underhill.org"), conferences[0].jid); - CPPUNIT_ASSERT(conferences[0].autoJoin); - CPPUNIT_ASSERT_EQUAL(String("Puck"), conferences[0].nick); - CPPUNIT_ASSERT_EQUAL(String("MyPass"), conferences[0].password); + std::vector<Storage::Room> rooms = payload->getRooms(); + CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(rooms.size())); + CPPUNIT_ASSERT_EQUAL(String("Council of Oberon"), rooms[0].name); + CPPUNIT_ASSERT_EQUAL(JID("council@conference.underhill.org"), rooms[0].jid); + CPPUNIT_ASSERT(rooms[0].autoJoin); + CPPUNIT_ASSERT_EQUAL(String("Puck"), rooms[0].nick); + CPPUNIT_ASSERT_EQUAL(String("MyPass"), rooms[0].password); } - void testParse_MultipleConferences() { + void testParse_MultipleRooms() { PayloadsParserTester parser; CPPUNIT_ASSERT(parser.parse( @@ -59,12 +59,12 @@ class StorageParserTest : public CppUnit::TestFixture { "</storage>")); Storage* payload = dynamic_cast<Storage*>(parser.getPayload().get()); - std::vector<Storage::Conference> conferences = payload->getConferences(); - CPPUNIT_ASSERT_EQUAL(2, static_cast<int>(conferences.size())); - CPPUNIT_ASSERT_EQUAL(String("Council of Oberon"), conferences[0].name); - CPPUNIT_ASSERT_EQUAL(JID("council@conference.underhill.org"), conferences[0].jid); - CPPUNIT_ASSERT_EQUAL(String("Tea party"), conferences[1].name); - CPPUNIT_ASSERT_EQUAL(JID("teaparty@wonderland.lit"), conferences[1].jid); + std::vector<Storage::Room> rooms = payload->getRooms(); + CPPUNIT_ASSERT_EQUAL(2, static_cast<int>(rooms.size())); + CPPUNIT_ASSERT_EQUAL(String("Council of Oberon"), rooms[0].name); + CPPUNIT_ASSERT_EQUAL(JID("council@conference.underhill.org"), rooms[0].jid); + CPPUNIT_ASSERT_EQUAL(String("Tea party"), rooms[1].name); + CPPUNIT_ASSERT_EQUAL(JID("teaparty@wonderland.lit"), rooms[1].jid); } void testParse_URL() { |