summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-08-22 09:44:35 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-08-22 09:44:35 (GMT)
commit4814521a30b1edbd34a782cd804a501225294fd8 (patch)
treeb0b8df3ea1b5e5aaf8c964c8c817a8982cce644b /Swiften/Queries/Responders/UnitTest/DiscoInfoResponderTest.cpp
parentfe4dbe0430524152d198401eb18934abd4bae082 (diff)
downloadswift-contrib-4814521a30b1edbd34a782cd804a501225294fd8.zip
swift-contrib-4814521a30b1edbd34a782cd804a501225294fd8.tar.bz2
Fix expanded tab characters.
Diffstat (limited to 'Swiften/Queries/Responders/UnitTest/DiscoInfoResponderTest.cpp')
-rw-r--r--Swiften/Queries/Responders/UnitTest/DiscoInfoResponderTest.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/Swiften/Queries/Responders/UnitTest/DiscoInfoResponderTest.cpp b/Swiften/Queries/Responders/UnitTest/DiscoInfoResponderTest.cpp
index 44db138..6ed7b9e 100644
--- a/Swiften/Queries/Responders/UnitTest/DiscoInfoResponderTest.cpp
+++ b/Swiften/Queries/Responders/UnitTest/DiscoInfoResponderTest.cpp
@@ -19,66 +19,66 @@ class DiscoInfoResponderTest : public CppUnit::TestFixture {
DiscoInfoResponderTest() {}
void setUp() {
- channel_ = new DummyIQChannel();
- router_ = new IQRouter(channel_);
+ channel_ = new DummyIQChannel();
+ router_ = new IQRouter(channel_);
}
void tearDown() {
- delete router_;
- delete channel_;
+ delete router_;
+ delete channel_;
}
void testHandleRequest_GetToplevelInfo() {
- DiscoInfoResponder testling(router_);
+ DiscoInfoResponder testling(router_);
DiscoInfo discoInfo;
discoInfo.addFeature("foo");
- testling.setDiscoInfo(discoInfo);
+ testling.setDiscoInfo(discoInfo);
- boost::shared_ptr<DiscoInfo> query(new DiscoInfo());
- channel_->onIQReceived(IQ::createRequest(IQ::Get, JID("foo@bar.com"), "id-1", query));
+ boost::shared_ptr<DiscoInfo> query(new DiscoInfo());
+ channel_->onIQReceived(IQ::createRequest(IQ::Get, JID("foo@bar.com"), "id-1", query));
- CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(channel_->iqs_.size()));
- boost::shared_ptr<DiscoInfo> payload(channel_->iqs_[0]->getPayload<DiscoInfo>());
- CPPUNIT_ASSERT(payload);
- CPPUNIT_ASSERT_EQUAL(String(""), payload->getNode());
- CPPUNIT_ASSERT(payload->hasFeature("foo"));
- }
+ CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(channel_->iqs_.size()));
+ boost::shared_ptr<DiscoInfo> payload(channel_->iqs_[0]->getPayload<DiscoInfo>());
+ CPPUNIT_ASSERT(payload);
+ CPPUNIT_ASSERT_EQUAL(String(""), payload->getNode());
+ CPPUNIT_ASSERT(payload->hasFeature("foo"));
+ }
void testHandleRequest_GetNodeInfo() {
- DiscoInfoResponder testling(router_);
+ DiscoInfoResponder testling(router_);
DiscoInfo discoInfo;
discoInfo.addFeature("foo");
- testling.setDiscoInfo(discoInfo);
+ testling.setDiscoInfo(discoInfo);
DiscoInfo discoInfoBar;
discoInfoBar.addFeature("bar");
- testling.setDiscoInfo("bar-node", discoInfoBar);
+ testling.setDiscoInfo("bar-node", discoInfoBar);
- boost::shared_ptr<DiscoInfo> query(new DiscoInfo());
- query->setNode("bar-node");
- channel_->onIQReceived(IQ::createRequest(IQ::Get, JID("foo@bar.com"), "id-1", query));
+ boost::shared_ptr<DiscoInfo> query(new DiscoInfo());
+ query->setNode("bar-node");
+ channel_->onIQReceived(IQ::createRequest(IQ::Get, JID("foo@bar.com"), "id-1", query));
- CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(channel_->iqs_.size()));
- boost::shared_ptr<DiscoInfo> payload(channel_->iqs_[0]->getPayload<DiscoInfo>());
- CPPUNIT_ASSERT(payload);
- CPPUNIT_ASSERT_EQUAL(String("bar-node"), payload->getNode());
- CPPUNIT_ASSERT(payload->hasFeature("bar"));
- }
+ CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(channel_->iqs_.size()));
+ boost::shared_ptr<DiscoInfo> payload(channel_->iqs_[0]->getPayload<DiscoInfo>());
+ CPPUNIT_ASSERT(payload);
+ CPPUNIT_ASSERT_EQUAL(String("bar-node"), payload->getNode());
+ CPPUNIT_ASSERT(payload->hasFeature("bar"));
+ }
void testHandleRequest_GetInvalidNodeInfo() {
- DiscoInfoResponder testling(router_);
+ DiscoInfoResponder testling(router_);
- boost::shared_ptr<DiscoInfo> query(new DiscoInfo());
- query->setNode("bar-node");
- channel_->onIQReceived(IQ::createRequest(IQ::Get, JID("foo@bar.com"), "id-1", query));
+ boost::shared_ptr<DiscoInfo> query(new DiscoInfo());
+ query->setNode("bar-node");
+ channel_->onIQReceived(IQ::createRequest(IQ::Get, JID("foo@bar.com"), "id-1", query));
- CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(channel_->iqs_.size()));
- boost::shared_ptr<Error> payload(channel_->iqs_[0]->getPayload<Error>());
- CPPUNIT_ASSERT(payload);
- }
+ CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(channel_->iqs_.size()));
+ boost::shared_ptr<Error> payload(channel_->iqs_[0]->getPayload<Error>());
+ CPPUNIT_ASSERT(payload);
+ }
- private:
- IQRouter* router_;
- DummyIQChannel* channel_;
+ private:
+ IQRouter* router_;
+ DummyIQChannel* channel_;
};
CPPUNIT_TEST_SUITE_REGISTRATION(DiscoInfoResponderTest);