summaryrefslogtreecommitdiff
path: root/cpp/src/tests/MessagingSessionTests.cpp
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2010-07-28 18:35:15 +0000
committerTed Ross <tross@apache.org>2010-07-28 18:35:15 +0000
commit1c077959ef54f616ec12e9644b4f07557a3e220d (patch)
tree90e1adeb4285b64073971d0facf016569b142f26 /cpp/src/tests/MessagingSessionTests.cpp
parent1939f9db799507eabfc7eb1daa74e3cb31b5b252 (diff)
downloadqpid-python-1c077959ef54f616ec12e9644b4f07557a3e220d.tar.gz
Made the new C++ API more friendly for swig-wrapping.
- Added Message::setProperty() as an alternative to using getProperties() to obtain a writable reference to a Variant::Map. - Added unit testing for this new method. - Added #ifndef SWIG conditions around the declarations of non-member operator<< methods. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@980147 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/MessagingSessionTests.cpp')
-rw-r--r--cpp/src/tests/MessagingSessionTests.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/cpp/src/tests/MessagingSessionTests.cpp b/cpp/src/tests/MessagingSessionTests.cpp
index d6992fc049..d75ff9fdfd 100644
--- a/cpp/src/tests/MessagingSessionTests.cpp
+++ b/cpp/src/tests/MessagingSessionTests.cpp
@@ -83,6 +83,7 @@ QPID_AUTO_TEST_CASE(testSendReceiveHeaders)
Message out("test-message");
for (uint i = 0; i < 10; ++i) {
out.getProperties()["a"] = i;
+ out.setProperty("b", i + 100);
sender.send(out);
}
Receiver receiver = fix.session.createReceiver(fix.queue);
@@ -91,6 +92,7 @@ QPID_AUTO_TEST_CASE(testSendReceiveHeaders)
BOOST_CHECK(receiver.fetch(in, Duration::SECOND * 5));
BOOST_CHECK_EQUAL(in.getContent(), out.getContent());
BOOST_CHECK_EQUAL(in.getProperties()["a"].asUint32(), i);
+ BOOST_CHECK_EQUAL(in.getProperties()["b"].asUint32(), i + 100);
fix.session.acknowledge();
}
}