summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-10-31 18:51:01 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-11-03 12:17:40 (GMT)
commitd509598b0f0edf5e103caedbab8662edc834445e (patch)
tree9365ef58175eee453f999c1c5b8515cb50cf90e0 /Swiften/Presence/UnitTest/PresenceOracleTest.cpp
parentbadcdcb7456d38016ea1746d6754a40dd9646813 (diff)
downloadswift-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.cpp6
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;