summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-12-12 12:29:20 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-12-12 16:00:53 (GMT)
commit4315ccbd51f63e408d69d944f162d0ead4f9addd (patch)
tree046b3734d18c7c5e76040e8798a6f4af5e5045cb /Swift/Controllers/UnitTest
parentaaf38fe2e6804bd87ea5e99a05ed57070cbe1c57 (diff)
downloadswift-4315ccbd51f63e408d69d944f162d0ead4f9addd.zip
swift-4315ccbd51f63e408d69d944f162d0ead4f9addd.tar.bz2
Refactored own nickname handling.
Diffstat (limited to 'Swift/Controllers/UnitTest')
-rw-r--r--Swift/Controllers/UnitTest/MockMainWindow.h3
-rw-r--r--Swift/Controllers/UnitTest/RosterControllerTest.cpp6
2 files changed, 7 insertions, 2 deletions
diff --git a/Swift/Controllers/UnitTest/MockMainWindow.h b/Swift/Controllers/UnitTest/MockMainWindow.h
index 3d786d9..79c148a 100644
--- a/Swift/Controllers/UnitTest/MockMainWindow.h
+++ b/Swift/Controllers/UnitTest/MockMainWindow.h
@@ -15,7 +15,8 @@ namespace Swift {
MockMainWindow() {};
virtual ~MockMainWindow() {};
virtual void setRosterModel(Roster* roster) {this->roster = roster;};
- virtual void setMyName(const String& /*name*/) {};;
+ virtual void setMyNick(const String& /*name*/) {};;
+ virtual void setMyJID(const JID& /*jid*/) {};;
virtual void setMyAvatarPath(const String& /*path*/) {};
virtual void setMyStatusText(const String& /*status*/) {};
virtual void setMyStatusType(StatusShow::Type /*type*/) {};
diff --git a/Swift/Controllers/UnitTest/RosterControllerTest.cpp b/Swift/Controllers/UnitTest/RosterControllerTest.cpp
index 50419f9..df93ca5 100644
--- a/Swift/Controllers/UnitTest/RosterControllerTest.cpp
+++ b/Swift/Controllers/UnitTest/RosterControllerTest.cpp
@@ -30,6 +30,7 @@
#include "Swift/Controllers/UIEvents/RenameRosterItemUIEvent.h"
#include "Swift/Controllers/UIEvents/RegroupRosterItemUIEvent.h"
#include "Swiften/MUC/MUCRegistry.h"
+#include <Swiften/Client/DummyNickManager.h>
using namespace Swift;
@@ -67,12 +68,14 @@ class RosterControllerTest : public CppUnit::TestFixture
eventController_ = new EventController();
uiEventStream_ = new UIEventStream();
settings_ = new DummySettingsProvider();
- rosterController_ = new RosterController(jid_, xmppRoster_, avatarManager_, mainWindowFactory_, nickResolver_, presenceOracle_, subscriptionManager_, eventController_, uiEventStream_, router_, settings_);
+ nickManager_ = new DummyNickManager();
+ rosterController_ = new RosterController(jid_, xmppRoster_, avatarManager_, mainWindowFactory_, nickManager_, nickResolver_, presenceOracle_, subscriptionManager_, eventController_, uiEventStream_, router_, settings_);
mainWindow_ = mainWindowFactory_->last;
};
void tearDown() {
delete rosterController_;
+ delete nickManager_;
delete nickResolver_;
delete mucRegistry_;
delete mainWindowFactory_;
@@ -304,6 +307,7 @@ class RosterControllerTest : public CppUnit::TestFixture
MUCRegistry* mucRegistry_;
AvatarManager* avatarManager_;
MockMainWindowFactory* mainWindowFactory_;
+ NickManager* nickManager_;
NickResolver* nickResolver_;
RosterController* rosterController_;
DummyIQChannel* channel_;