From 9f9f598a5c969cdc43c6cf3ed9c4a309c5933ab5 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Thu, 23 Apr 2009 11:48:32 +0000 Subject: Apply PIMPL pattern to client::Completion and client::Future. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@767896 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/tests/AsyncCompletion.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'cpp/src/tests/AsyncCompletion.cpp') diff --git a/cpp/src/tests/AsyncCompletion.cpp b/cpp/src/tests/AsyncCompletion.cpp index e33b2dc35d..81189bca93 100644 --- a/cpp/src/tests/AsyncCompletion.cpp +++ b/cpp/src/tests/AsyncCompletion.cpp @@ -24,6 +24,8 @@ #include "qpid/sys/BlockingQueue.h" #include "qpid/client/AsyncSession.h" #include "qpid/sys/Time.h" +#include "qpid/framing/QueueQueryResult.h" +#include "qpid/client/TypedResult.h" using namespace std; using namespace qpid; @@ -97,4 +99,15 @@ QPID_AUTO_TEST_CASE(testWaitTillComplete) { sync.wait(); // Should complete now, all messages are completed. } +QPID_AUTO_TEST_CASE(testGetResult) { + SessionFixture fix; + AsyncSession s = fix.session; + + s.queueDeclare("q", arg::durable=true); + TypedResult tr = s.queueQuery("q"); + QueueQueryResult qq = tr.get(); + BOOST_CHECK_EQUAL(qq.getQueue(), "q"); + BOOST_CHECK_EQUAL(qq.getMessageCount(), 0); +} + QPID_AUTO_TEST_SUITE_END() -- cgit v1.2.1