diff options
| author | Gordon Sim <gsim@apache.org> | 2012-01-03 19:50:37 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2012-01-03 19:50:37 +0000 |
| commit | 4d6c362d7b026dc894c11772b9ffe5f538c27923 (patch) | |
| tree | 0ff61ea3f0e82d05a6d9e75488e84f243e280ccb /cpp/src/tests | |
| parent | 02bbab932f5f845bfa8eac6069bc4159bbe53d07 (diff) | |
| download | qpid-python-4d6c362d7b026dc894c11772b9ffe5f538c27923.tar.gz | |
QPID-3492: Fix quoted values as well as unquoted values; added a test case
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1226931 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests')
| -rw-r--r-- | cpp/src/tests/MessagingSessionTests.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/cpp/src/tests/MessagingSessionTests.cpp b/cpp/src/tests/MessagingSessionTests.cpp index 9d5db84bb4..313e8b3132 100644 --- a/cpp/src/tests/MessagingSessionTests.cpp +++ b/cpp/src/tests/MessagingSessionTests.cpp @@ -1118,6 +1118,27 @@ QPID_AUTO_TEST_CASE(testUnsubscribeOnClose) fix.session.acknowledge(); } +QPID_AUTO_TEST_CASE(testHeadersExchange) +{ + MessagingFixture fix; + //use both quoted and unquoted values + Receiver receiver = fix.session.createReceiver("amq.match; {link:{x-bindings:[{arguments:{x-match:all,qpid.subject:'abc',my-property:abc}}]}}"); + Sender sender = fix.session.createSender("amq.match"); + Message out("test-message"); + out.setSubject("abc"); + Variant& property = out.getProperties()["my-property"]; + property = "abc"; + property.setEncoding("utf8"); + sender.send(out, true); + Message in; + if (receiver.fetch(in, Duration::SECOND)) { + fix.session.acknowledge(); + BOOST_CHECK_EQUAL(in.getContent(), out.getContent()); + } else { + BOOST_FAIL("Message did not match as expected!"); + } +} + QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests |
