summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Roster/UnitTest')
-rw-r--r--Swiften/Roster/UnitTest/XMPPRosterControllerTest.cpp5
-rw-r--r--Swiften/Roster/UnitTest/XMPPRosterImplTest.cpp26
2 files changed, 13 insertions, 18 deletions
diff --git a/Swiften/Roster/UnitTest/XMPPRosterControllerTest.cpp b/Swiften/Roster/UnitTest/XMPPRosterControllerTest.cpp
index a8585f1..debbd50 100644
--- a/Swiften/Roster/UnitTest/XMPPRosterControllerTest.cpp
+++ b/Swiften/Roster/UnitTest/XMPPRosterControllerTest.cpp
@@ -17,8 +17,7 @@
using namespace Swift;
-class XMPPRosterControllerTest : public CppUnit::TestFixture
-{
+class XMPPRosterControllerTest : public CppUnit::TestFixture {
CPPUNIT_TEST_SUITE(XMPPRosterControllerTest);
CPPUNIT_TEST(testAdd);
CPPUNIT_TEST(testModify);
@@ -26,8 +25,6 @@ class XMPPRosterControllerTest : public CppUnit::TestFixture
CPPUNIT_TEST_SUITE_END();
public:
- XMPPRosterControllerTest() {}
-
void setUp() {
channel_ = new DummyIQChannel();
router_ = new IQRouter(channel_);
diff --git a/Swiften/Roster/UnitTest/XMPPRosterImplTest.cpp b/Swiften/Roster/UnitTest/XMPPRosterImplTest.cpp
index fbc3430..5f0c9fd 100644
--- a/Swiften/Roster/UnitTest/XMPPRosterImplTest.cpp
+++ b/Swiften/Roster/UnitTest/XMPPRosterImplTest.cpp
@@ -73,28 +73,18 @@ private:
};
-class XMPPRosterImplTest : public CppUnit::TestFixture
-{
+class XMPPRosterImplTest : public CppUnit::TestFixture {
CPPUNIT_TEST_SUITE(XMPPRosterImplTest);
CPPUNIT_TEST(testJIDAdded);
CPPUNIT_TEST(testJIDRemoved);
CPPUNIT_TEST(testJIDUpdated);
CPPUNIT_TEST_SUITE_END();
- private:
- XMPPRosterImpl* roster_;
- XMPPRosterSignalHandler* handler_;
- JID jid1_;
- JID jid2_;
- JID jid3_;
- std::vector<String> groups1_;
- std::vector<String> groups2_;
-
-
public:
- XMPPRosterImplTest() : jid1_(JID("a@b.c")), jid2_(JID("b@c.d")), jid3_(JID("c@d.e")) {}
-
void setUp() {
+ jid1_ = JID("a@b.c");
+ jid2_ = JID("b@c.d");
+ jid3_ = JID("c@d.e");
roster_ = new XMPPRosterImpl();
handler_ = new XMPPRosterSignalHandler(roster_);
groups1_.push_back("bobs");
@@ -165,6 +155,14 @@ class XMPPRosterImplTest : public CppUnit::TestFixture
CPPUNIT_ASSERT(groups2_ == roster_->getGroupsForJID(jid1_));
}
+ private:
+ XMPPRosterImpl* roster_;
+ XMPPRosterSignalHandler* handler_;
+ JID jid1_;
+ JID jid2_;
+ JID jid3_;
+ std::vector<String> groups1_;
+ std::vector<String> groups2_;
};
CPPUNIT_TEST_SUITE_REGISTRATION(XMPPRosterImplTest);