diff options
Diffstat (limited to 'Swift/Controllers/UnitTest/PresenceNotifierTest.cpp')
| -rw-r--r-- | Swift/Controllers/UnitTest/PresenceNotifierTest.cpp | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/Swift/Controllers/UnitTest/PresenceNotifierTest.cpp b/Swift/Controllers/UnitTest/PresenceNotifierTest.cpp index 681177a..40530dc 100644 --- a/Swift/Controllers/UnitTest/PresenceNotifierTest.cpp +++ b/Swift/Controllers/UnitTest/PresenceNotifierTest.cpp | |||
| @@ -1,25 +1,29 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2010 Isode Limited. | 2 | * Copyright (c) 2010-2015 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | #include <cppunit/extensions/HelperMacros.h> | ||
| 8 | #include <cppunit/extensions/TestFactoryRegistry.h> | ||
| 9 | #include <vector> | 7 | #include <vector> |
| 8 | |||
| 10 | #include <boost/bind.hpp> | 9 | #include <boost/bind.hpp> |
| 11 | 10 | ||
| 12 | #include "Swift/Controllers/PresenceNotifier.h" | 11 | #include <cppunit/extensions/HelperMacros.h> |
| 13 | #include "Swiften/Client/NickResolver.h" | 12 | #include <cppunit/extensions/TestFactoryRegistry.h> |
| 14 | #include "SwifTools/Notifier/LoggingNotifier.h" | 13 | |
| 15 | #include "Swiften/Client/DummyStanzaChannel.h" | 14 | #include <Swiften/Avatars/DummyAvatarManager.h> |
| 16 | #include "Swiften/MUC/MUCRegistry.h" | 15 | #include <Swiften/Client/DummyStanzaChannel.h> |
| 17 | #include "Swiften/Roster/XMPPRosterImpl.h" | 16 | #include <Swiften/Client/NickResolver.h> |
| 18 | #include "Swiften/Presence/PresenceOracle.h" | 17 | #include <Swiften/MUC/MUCRegistry.h> |
| 19 | #include "Swiften/Avatars/DummyAvatarManager.h" | 18 | #include <Swiften/Network/DummyTimerFactory.h> |
| 20 | #include "Swiften/Network/DummyTimerFactory.h" | 19 | #include <Swiften/Presence/PresenceOracle.h> |
| 20 | #include <Swiften/Roster/XMPPRosterImpl.h> | ||
| 21 | |||
| 22 | #include <Swift/Controllers/PresenceNotifier.h> | ||
| 23 | |||
| 24 | #include <SwifTools/Notifier/LoggingNotifier.h> | ||
| 21 | 25 | ||
| 22 | using namespace Swift; | 26 | using namespace Swift; |
| 23 | 27 | ||
| 24 | class PresenceNotifierTest : public CppUnit::TestFixture { | 28 | class PresenceNotifierTest : public CppUnit::TestFixture { |
| 25 | CPPUNIT_TEST_SUITE(PresenceNotifierTest); | 29 | CPPUNIT_TEST_SUITE(PresenceNotifierTest); |
| @@ -52,11 +56,11 @@ class PresenceNotifierTest : public CppUnit::TestFixture { | |||
| 52 | user1 = JID("user1@bar.com/bla"); | 56 | user1 = JID("user1@bar.com/bla"); |
| 53 | user2 = JID("user2@foo.com/baz"); | 57 | user2 = JID("user2@foo.com/baz"); |
| 54 | avatarManager = new DummyAvatarManager(); | 58 | avatarManager = new DummyAvatarManager(); |
| 55 | roster = new XMPPRosterImpl(); | 59 | roster = new XMPPRosterImpl(); |
| 56 | nickResolver = new NickResolver(JID("foo@bar.com"), roster, NULL, mucRegistry); | 60 | nickResolver = new NickResolver(JID("foo@bar.com"), roster, NULL, mucRegistry); |
| 57 | presenceOracle = new PresenceOracle(stanzaChannel); | 61 | presenceOracle = new PresenceOracle(stanzaChannel, roster); |
| 58 | timerFactory = new DummyTimerFactory(); | 62 | timerFactory = new DummyTimerFactory(); |
| 59 | } | 63 | } |
| 60 | 64 | ||
| 61 | void tearDown() { | 65 | void tearDown() { |
| 62 | delete timerFactory; | 66 | delete timerFactory; |
Swift