diff options
Diffstat (limited to 'cpp/src/tests/MessagingSessionTests.cpp')
-rw-r--r-- | cpp/src/tests/MessagingSessionTests.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/cpp/src/tests/MessagingSessionTests.cpp b/cpp/src/tests/MessagingSessionTests.cpp index 5b030f0f31..082c639636 100644 --- a/cpp/src/tests/MessagingSessionTests.cpp +++ b/cpp/src/tests/MessagingSessionTests.cpp @@ -704,7 +704,6 @@ QPID_AUTO_TEST_CASE(testGetSender) BOOST_CHECK_THROW(fix.session.getSender("UnknownSender"), qpid::messaging::KeyError); } - QPID_AUTO_TEST_CASE(testGetReceiver) { QueueFixture fix; @@ -719,6 +718,19 @@ QPID_AUTO_TEST_CASE(testGetReceiver) BOOST_CHECK_THROW(fix.session.getReceiver("UnknownReceiver"), qpid::messaging::KeyError); } +QPID_AUTO_TEST_CASE(testGetSession) +{ + QueueFixture fix; + fix.connection.newSession("my-session"); + Session session = fix.connection.getSession("my-session"); + Message out(Uuid(true).str()); + session.createSender(fix.queue).send(out); + Message in; + BOOST_CHECK(session.createReceiver(fix.queue).fetch(in)); + BOOST_CHECK_EQUAL(out.getContent(), in.getContent()); + BOOST_CHECK_THROW(fix.connection.getSession("UnknownSession"), qpid::messaging::KeyError); +} + QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests |