RosterManagerTest: check received presences

This commit is contained in:
Jan Kaluza 2011-10-26 17:58:13 +02:00
parent 2faaeff76d
commit 1a4b25835e

View file

@ -114,6 +114,13 @@ class RosterManagerTest : public CPPUNIT_NS :: TestFixture, public BasicTest {
// we should get presences
CPPUNIT_ASSERT_EQUAL(4, (int) received.size());
CPPUNIT_ASSERT(dynamic_cast<Swift::Presence *>(getStanza(received[2])));
CPPUNIT_ASSERT_EQUAL(Swift::StatusShow::Away, dynamic_cast<Swift::Presence *>(getStanza(received[2]))->getShow());
CPPUNIT_ASSERT_EQUAL(std::string("status1"), dynamic_cast<Swift::Presence *>(getStanza(received[2]))->getStatus());
CPPUNIT_ASSERT(dynamic_cast<Swift::Presence *>(getStanza(received[3])));
CPPUNIT_ASSERT_EQUAL(Swift::StatusShow::Away, dynamic_cast<Swift::Presence *>(getStanza(received[3]))->getShow());
CPPUNIT_ASSERT_EQUAL(std::string("status2"), dynamic_cast<Swift::Presence *>(getStanza(received[3]))->getStatus());
}
void disconnectUser() {