summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-10-09 09:52:51 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-10-09 14:20:47 (GMT)
commitc5bb67eab6f97ae0f5f7e673ff0ba9b1111191f4 (patch)
treead17bd2ee34263af472340a839a4757859ddaea1 /Swiften/Queries/Requests/UnitTest
parent0a84186a22fd48485deed77bc067877ac332d0b4 (diff)
downloadswift-contrib-c5bb67eab6f97ae0f5f7e673ff0ba9b1111191f4.zip
swift-contrib-c5bb67eab6f97ae0f5f7e673ff0ba9b1111191f4.tar.bz2
Added EchoBot walkthrough example.
Diffstat (limited to 'Swiften/Queries/Requests/UnitTest')
-rw-r--r--Swiften/Queries/Requests/UnitTest/GetPrivateStorageRequestTest.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/Swiften/Queries/Requests/UnitTest/GetPrivateStorageRequestTest.cpp b/Swiften/Queries/Requests/UnitTest/GetPrivateStorageRequestTest.cpp
index d90a114..fe8b0a0 100644
--- a/Swiften/Queries/Requests/UnitTest/GetPrivateStorageRequestTest.cpp
+++ b/Swiften/Queries/Requests/UnitTest/GetPrivateStorageRequestTest.cpp
@@ -45,8 +45,8 @@ class GetPrivateStorageRequestTest : public CppUnit::TestFixture
}
void testSend() {
- GetPrivateStorageRequest<MyPayload> request(router);
- request.send();
+ GetPrivateStorageRequest<MyPayload>::ref request = GetPrivateStorageRequest<MyPayload>::create(router);
+ request->send();
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(channel->iqs_.size()));
CPPUNIT_ASSERT_EQUAL(JID(), channel->iqs_[0]->getTo());
@@ -58,9 +58,9 @@ class GetPrivateStorageRequestTest : public CppUnit::TestFixture
}
void testHandleResponse() {
- GetPrivateStorageRequest<MyPayload> testling(router);
- testling.onResponse.connect(boost::bind(&GetPrivateStorageRequestTest::handleResponse, this, _1, _2));
- testling.send();
+ GetPrivateStorageRequest<MyPayload>::ref testling = GetPrivateStorageRequest<MyPayload>::create(router);
+ testling->onResponse.connect(boost::bind(&GetPrivateStorageRequestTest::handleResponse, this, _1, _2));
+ testling->send();
channel->onIQReceived(createResponse("test-id", "foo"));
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(responses.size()));
@@ -68,9 +68,9 @@ class GetPrivateStorageRequestTest : public CppUnit::TestFixture
}
void testHandleResponse_Error() {
- GetPrivateStorageRequest<MyPayload> testling(router);
- testling.onResponse.connect(boost::bind(&GetPrivateStorageRequestTest::handleResponse, this, _1, _2));
- testling.send();
+ GetPrivateStorageRequest<MyPayload>::ref testling = GetPrivateStorageRequest<MyPayload>::create(router);
+ testling->onResponse.connect(boost::bind(&GetPrivateStorageRequestTest::handleResponse, this, _1, _2));
+ testling->send();
channel->onIQReceived(createError("test-id"));
CPPUNIT_ASSERT_EQUAL(0, static_cast<int>(responses.size()));