diff options
| author | Gordon Sim <gsim@apache.org> | 2010-04-12 17:25:35 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2010-04-12 17:25:35 +0000 |
| commit | 77b744ca228a8f0724e99817fd4bcc6f4c31cdfa (patch) | |
| tree | 26a049576261ef567be016325037bd87ddf2a38b /qpid/cpp/src/tests/MessagingSessionTests.cpp | |
| parent | 54f1931abc18f1b683bc90426e088ae0a4c56a0e (diff) | |
| download | qpid-python-77b744ca228a8f0724e99817fd4bcc6f4c31cdfa.tar.gz | |
QPID-664: changed option verifier to use constants rather than duplicating string literals; added a test to make sure all valid options are allowed and illegal ones are not
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@933330 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/MessagingSessionTests.cpp')
| -rw-r--r-- | qpid/cpp/src/tests/MessagingSessionTests.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/qpid/cpp/src/tests/MessagingSessionTests.cpp b/qpid/cpp/src/tests/MessagingSessionTests.cpp index d134793b82..e1b2a35213 100644 --- a/qpid/cpp/src/tests/MessagingSessionTests.cpp +++ b/qpid/cpp/src/tests/MessagingSessionTests.cpp @@ -872,6 +872,13 @@ QPID_AUTO_TEST_CASE(testRelease) fix.session.acknowledge(true); } +QPID_AUTO_TEST_CASE(testOptionVerification) +{ + MessagingFixture fix; + fix.session.createReceiver("my-queue; {create: always, assert: always, delete: always, node: {type: queue, durable: false, x-declare: {arguments: {a: b}}, x-bindings: [{exchange: amq.fanout}]}, link: {name: abc, durable: false, reliability: exactly-once, x-subscribe: {arguments:{a:b}}, x-bindings:[{exchange: amq.fanout}]}, mode: browse}"); + BOOST_CHECK_THROW(fix.session.createReceiver("my-queue; {invalid-option:blah}"), qpid::messaging::AddressError); +} + QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests |
