diff options
| author | Gordon Sim <gsim@apache.org> | 2006-10-30 19:27:54 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2006-10-30 19:27:54 +0000 |
| commit | b0a120b4edfdb49a08bd7c8c2479e7b1cadc5233 (patch) | |
| tree | d2b4ca0e774100285e116e5442bff9e55b4a3f92 /cpp/test/unit/qpid/broker/ChannelTest.cpp | |
| parent | f491af49008a2ed219ad4507cd507b4317afa4cb (diff) | |
| download | qpid-python-b0a120b4edfdb49a08bd7c8c2479e7b1cadc5233.tar.gz | |
Initial implementation for tx class.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@469242 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/test/unit/qpid/broker/ChannelTest.cpp')
| -rw-r--r-- | cpp/test/unit/qpid/broker/ChannelTest.cpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/cpp/test/unit/qpid/broker/ChannelTest.cpp b/cpp/test/unit/qpid/broker/ChannelTest.cpp index b0907a40f3..5052d4127d 100644 --- a/cpp/test/unit/qpid/broker/ChannelTest.cpp +++ b/cpp/test/unit/qpid/broker/ChannelTest.cpp @@ -26,14 +26,6 @@ using namespace qpid::broker; using namespace qpid::framing; using namespace qpid::concurrent; -struct DummyRouter{ - Message::shared_ptr last; - - void operator()(Message::shared_ptr& msg){ - last = msg; - } -}; - struct DummyHandler : OutputHandler{ std::vector<AMQFrame*> frames; @@ -46,31 +38,12 @@ struct DummyHandler : OutputHandler{ class ChannelTest : public CppUnit::TestCase { CPPUNIT_TEST_SUITE(ChannelTest); - CPPUNIT_TEST(testIncoming); CPPUNIT_TEST(testConsumerMgmt); CPPUNIT_TEST(testDeliveryNoAck); CPPUNIT_TEST_SUITE_END(); public: - void testIncoming(){ - Channel channel(0, 0, 10000); - string routingKey("my_routing_key"); - channel.handlePublish(new Message(0, "test", routingKey, false, false)); - AMQHeaderBody::shared_ptr header(new AMQHeaderBody(BASIC)); - header->setContentSize(14); - string data1("abcdefg"); - string data2("hijklmn"); - AMQContentBody::shared_ptr part1(new AMQContentBody(data1)); - AMQContentBody::shared_ptr part2(new AMQContentBody(data2)); - - CPPUNIT_ASSERT(!channel.handleHeader(header, DummyRouter()).last); - CPPUNIT_ASSERT(!channel.handleContent(part1, DummyRouter()).last); - DummyRouter router = channel.handleContent(part2, DummyRouter()); - CPPUNIT_ASSERT(router.last); - CPPUNIT_ASSERT_EQUAL(routingKey, router.last->getRoutingKey()); - } - void testConsumerMgmt(){ Queue::shared_ptr queue(new Queue("my_queue")); Channel channel(0, 0, 0); |
