MCPcopy Create free account
hub / github.com/apache/qpid-proton / test_container_links_properties

Function test_container_links_properties

cpp/src/container_test.cpp:402–425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

400}
401
402int test_container_links_properties() {
403 proton::receiver_options r_opts;
404 std::map<proton::symbol, proton::value> r_props;
405 r_props["recv.prop_str"] = "receiver_string";
406 r_opts.properties(r_props);
407
408 proton::sender_options s_opts;
409 std::map<proton::symbol, proton::value> s_props;
410 s_props["send.prop_str"] = "sender_string";
411 s_props["send.prop_int"] = 123456789;
412 s_opts.properties(s_props);
413
414 link_test_handler th(r_opts, s_opts);
415 proton::container(th).run();
416
417 ASSERT(th.had_receiver);
418 ASSERT(th.had_sender);
419 ASSERT_EQUAL(th.peer_receiver_properties.size(), 1u);
420 ASSERT_EQUAL(th.peer_receiver_properties["recv.prop_str"], "receiver_string");
421 ASSERT_EQUAL(th.peer_sender_properties.size(), 2u);
422 ASSERT_EQUAL(th.peer_sender_properties["send.prop_str"], "sender_string");
423 ASSERT_EQUAL(th.peer_sender_properties["send.prop_int"], 123456789);
424 return 0;
425}
426
427class test_mt_handler : public proton::messaging_handler {
428 public:

Callers 1

mainFunction · 0.85

Calls 4

containerClass · 0.70
propertiesMethod · 0.45
runMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected