| 183 | }; |
| 184 | |
| 185 | class test_host_user_pass : public test_handler { |
| 186 | public: |
| 187 | |
| 188 | void on_listener_start(proton::container & c) override { |
| 189 | connect(c, R"("scheme":"amqp", "host":"127.0.0.1", "user":"user@proton", "password":"password")"); |
| 190 | } |
| 191 | |
| 192 | void check_connection(connection& c) override { |
| 193 | ASSERT_EQUAL("127.0.0.1", c.virtual_host()); |
| 194 | if (pn_sasl_extended()) { |
| 195 | ASSERT_EQUAL("user@proton", c.user()); |
| 196 | } else { |
| 197 | ASSERT_EQUAL("anonymous", c.user()); |
| 198 | } |
| 199 | } |
| 200 | }; |
| 201 | |
| 202 | class test_tls : public test_handler { |
| 203 | static connection_options make_opts() { |