MCPcopy Create free account
hub / github.com/alanxz/SimpleAmqpClient / TEST

Function TEST

testing/test_get.cpp:51–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51TEST(test_get, get_big) {
52 // Smallest frame size allowed by AMQP
53 Channel::ptr_t channel = Channel::Create(connected_test::GetBrokerHost(),
54 5672, "guest", "guest", "/", 4096);
55 // Create a message with a body larger than a single frame
56 BasicMessage::ptr_t message = BasicMessage::Create(std::string(4099, 'a'));
57 std::string queue = channel->DeclareQueue("");
58
59 channel->BasicPublish("", queue, message);
60 Envelope::ptr_t new_message;
61 EXPECT_TRUE(channel->BasicGet(new_message, queue));
62 EXPECT_EQ(message->Body(), new_message->Message()->Body());
63}
64
65TEST_F(connected_test, bad_queue) {
66 Envelope::ptr_t new_message;

Callers

nothing calls this directly

Calls 5

DeclareQueueMethod · 0.80
BasicPublishMethod · 0.80
BasicGetMethod · 0.80
BodyMethod · 0.80
CreateFunction · 0.50

Tested by

no test coverage detected