summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-10-10 13:31:39 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-10-10 13:31:39 (GMT)
commit29e4e51e21b8902c82456cc85af46fa5f5889f04 (patch)
tree5ad1d62b82effb59d46d92a272b3ebe998ce6e08 /Swiften/Queries/Responders/UnitTest
parentfb7fe3dd7cf48b0e4a7337212129520dff5a236d (diff)
downloadswift-contrib-29e4e51e21b8902c82456cc85af46fa5f5889f04.zip
swift-contrib-29e4e51e21b8902c82456cc85af46fa5f5889f04.tar.bz2
Refactor responders to only start on start().
Diffstat (limited to 'Swiften/Queries/Responders/UnitTest')
-rw-r--r--Swiften/Queries/Responders/UnitTest/DiscoInfoResponderTest.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/Swiften/Queries/Responders/UnitTest/DiscoInfoResponderTest.cpp b/Swiften/Queries/Responders/UnitTest/DiscoInfoResponderTest.cpp
index 62d9aca..20fa9ff 100644
--- a/Swiften/Queries/Responders/UnitTest/DiscoInfoResponderTest.cpp
+++ b/Swiften/Queries/Responders/UnitTest/DiscoInfoResponderTest.cpp
@@ -35,7 +35,8 @@ class DiscoInfoResponderTest : public CppUnit::TestFixture {
}
void testHandleRequest_GetToplevelInfo() {
- DiscoInfoResponder testling(router_);
+ DiscoInfoResponder testling(router_);
+ testling.start();
DiscoInfo discoInfo;
discoInfo.addFeature("foo");
testling.setDiscoInfo(discoInfo);
@@ -48,10 +49,13 @@ class DiscoInfoResponderTest : public CppUnit::TestFixture {
CPPUNIT_ASSERT(payload);
CPPUNIT_ASSERT_EQUAL(String(""), payload->getNode());
CPPUNIT_ASSERT(payload->hasFeature("foo"));
+
+ testling.stop();
}
void testHandleRequest_GetNodeInfo() {
DiscoInfoResponder testling(router_);
+ testling.start();
DiscoInfo discoInfo;
discoInfo.addFeature("foo");
testling.setDiscoInfo(discoInfo);
@@ -68,6 +72,8 @@ class DiscoInfoResponderTest : public CppUnit::TestFixture {
CPPUNIT_ASSERT(payload);
CPPUNIT_ASSERT_EQUAL(String("bar-node"), payload->getNode());
CPPUNIT_ASSERT(payload->hasFeature("bar"));
+
+ testling.stop();
}
void testHandleRequest_GetInvalidNodeInfo() {