diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-10-31 18:51:01 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-11-03 12:17:40 (GMT) |
commit | d509598b0f0edf5e103caedbab8662edc834445e (patch) | |
tree | 9365ef58175eee453f999c1c5b8515cb50cf90e0 /Swiften/Presence/UnitTest/PresenceOracleTest.cpp | |
parent | badcdcb7456d38016ea1746d6754a40dd9646813 (diff) | |
download | swift-contrib-d509598b0f0edf5e103caedbab8662edc834445e.zip swift-contrib-d509598b0f0edf5e103caedbab8662edc834445e.tar.bz2 |
Refactoring Presence & MUC handling.
Diffstat (limited to 'Swiften/Presence/UnitTest/PresenceOracleTest.cpp')
-rw-r--r-- | Swiften/Presence/UnitTest/PresenceOracleTest.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Swiften/Presence/UnitTest/PresenceOracleTest.cpp b/Swiften/Presence/UnitTest/PresenceOracleTest.cpp index d3b4b20..aa450a2 100644 --- a/Swiften/Presence/UnitTest/PresenceOracleTest.cpp +++ b/Swiften/Presence/UnitTest/PresenceOracleTest.cpp @@ -11,6 +11,7 @@ #include "Swiften/Presence/PresenceOracle.h" #include "Swiften/Client/DummyStanzaChannel.h" +#include "Swiften/Presence/SubscriptionManager.h" using namespace Swift; @@ -31,13 +32,15 @@ class PresenceOracleTest : public CppUnit::TestFixture { stanzaChannel_ = new DummyStanzaChannel(); oracle_ = new PresenceOracle(stanzaChannel_); oracle_->onPresenceChange.connect(boost::bind(&PresenceOracleTest::handlePresenceChange, this, _1)); - oracle_->onPresenceSubscriptionRequest.connect(boost::bind(&PresenceOracleTest::handlePresenceSubscriptionRequest, this, _1, _2)); + subscriptionManager_ = new SubscriptionManager(stanzaChannel_); + subscriptionManager_->onPresenceSubscriptionRequest.connect(boost::bind(&PresenceOracleTest::handlePresenceSubscriptionRequest, this, _1, _2)); user1 = JID("user1@foo.com/Foo"); user1alt = JID("user1@foo.com/Bar"); user2 = JID("user2@bar.com/Bar"); } void tearDown() { + delete subscriptionManager_; delete oracle_; delete stanzaChannel_; } @@ -181,6 +184,7 @@ class PresenceOracleTest : public CppUnit::TestFixture { String reason; }; PresenceOracle* oracle_; + SubscriptionManager* subscriptionManager_; DummyStanzaChannel* stanzaChannel_; std::vector<Presence::ref> changes; std::vector<SubscriptionRequestInfo> subscriptionRequests; |