summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-09-15 18:45:37 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-09-15 18:45:37 (GMT)
commit8e5d1a11824d7a0900feb44ed5b5464d8d94ab2a (patch)
treecf19e679ad8e9f21e226135a41c94c558fa28662 /Swift/Controllers/UnitTest
parent7c6ca6948f81dc4ee6430d46aeae7f7de806a251 (diff)
downloadswift-8e5d1a11824d7a0900feb44ed5b5464d8d94ab2a.zip
swift-8e5d1a11824d7a0900feb44ed5b5464d8d94ab2a.tar.bz2
Use NickResolver for nicks in notifications.
Diffstat (limited to 'Swift/Controllers/UnitTest')
-rw-r--r--Swift/Controllers/UnitTest/PresenceNotifierTest.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/Swift/Controllers/UnitTest/PresenceNotifierTest.cpp b/Swift/Controllers/UnitTest/PresenceNotifierTest.cpp
index a410665..9addab2 100644
--- a/Swift/Controllers/UnitTest/PresenceNotifierTest.cpp
+++ b/Swift/Controllers/UnitTest/PresenceNotifierTest.cpp
@@ -10,6 +10,7 @@
#include <boost/bind.hpp>
#include "Swift/Controllers/PresenceNotifier.h"
+#include "Swift/Controllers/NickResolver.h"
#include "SwifTools/Notifier/LoggingNotifier.h"
#include "Swiften/Client/DummyStanzaChannel.h"
#include "Swiften/MUC/MUCRegistry.h"
@@ -52,12 +53,15 @@ class PresenceNotifierTest : public CppUnit::TestFixture {
user2 = JID("user2@foo.com/baz");
avatarManager = new DummyAvatarManager();
roster = new XMPPRoster();
+ nickResolver = new NickResolver(JID("foo@bar.com"), roster, NULL, mucRegistry);
presenceOracle = new PresenceOracle(stanzaChannel);
timerFactory = new DummyTimerFactory();
}
void tearDown() {
+ delete timerFactory;
delete presenceOracle;
+ delete nickResolver;
delete roster;
delete avatarManager;
delete mucRegistry;
@@ -269,7 +273,7 @@ class PresenceNotifierTest : public CppUnit::TestFixture {
private:
std::auto_ptr<PresenceNotifier> createNotifier() {
- std::auto_ptr<PresenceNotifier> result(new PresenceNotifier(stanzaChannel, notifier, mucRegistry, avatarManager, roster, presenceOracle, timerFactory));
+ std::auto_ptr<PresenceNotifier> result(new PresenceNotifier(stanzaChannel, notifier, mucRegistry, avatarManager, nickResolver, presenceOracle, timerFactory));
result->onNotificationActivated.connect(boost::bind(&PresenceNotifierTest::handleNotificationActivated, this, _1));
result->setInitialQuietPeriodMS(0);
return result;
@@ -300,6 +304,7 @@ class PresenceNotifierTest : public CppUnit::TestFixture {
MUCRegistry* mucRegistry;
DummyAvatarManager* avatarManager;
XMPPRoster* roster;
+ NickResolver* nickResolver;
PresenceOracle* presenceOracle;
DummyTimerFactory* timerFactory;
JID user1;