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

Function TEST_F

testing/test_message.cpp:119–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119TEST_F(connected_test, replaced_received_body) {
120 const std::string queue = channel->DeclareQueue("");
121 const std::string consumer = channel->BasicConsume(queue);
122
123 const std::string body("First Message Body");
124 BasicMessage::ptr_t out_message = BasicMessage::Create(body);
125 channel->BasicPublish("", queue, out_message);
126
127 Envelope::ptr_t envelope = channel->BasicConsumeMessage(consumer);
128 BasicMessage::ptr_t in_message = envelope->Message();
129 EXPECT_EQ(out_message->Body(), in_message->Body());
130
131 const std::string body2("Second message body");
132 in_message->Body(body2);
133 EXPECT_EQ(body2, in_message->Body());
134}

Callers

nothing calls this directly

Calls 6

DeclareQueueMethod · 0.80
BasicConsumeMethod · 0.80
BasicPublishMethod · 0.80
BasicConsumeMessageMethod · 0.80
BodyMethod · 0.80
CreateFunction · 0.50

Tested by

no test coverage detected