|
32 | 32 | package com.rabbitmq.client.test.functional; |
33 | 33 |
|
34 | 34 | import java.io.IOException; |
| 35 | +import java.util.Map; |
| 36 | +import java.util.HashMap; |
35 | 37 |
|
36 | 38 | import com.rabbitmq.client.AMQP; |
37 | 39 | import com.rabbitmq.client.Channel; |
@@ -223,6 +225,30 @@ public void with(String name) throws IOException { |
223 | 225 | }}); |
224 | 226 | } |
225 | 227 |
|
| 228 | + public void testUmeConfiguration() |
| 229 | + throws IOException |
| 230 | + { |
| 231 | + runTest(false, false, false, |
| 232 | + createUmeConfigTest("configure-me")); |
| 233 | + runTest(false, false, false, |
| 234 | + createUmeConfigTest("configure-and-write-me")); |
| 235 | + runTest(false, true, false, |
| 236 | + createUmeConfigTest("configure-and-read-me")); |
| 237 | + } |
| 238 | + |
| 239 | + protected WithName createUmeConfigTest(final String exchange) |
| 240 | + throws IOException |
| 241 | + { |
| 242 | + return new WithName() { |
| 243 | + public void with(String ume) throws IOException { |
| 244 | + Map<String, Object> args = new HashMap<String, Object>(); |
| 245 | + args.put("ume", ume); |
| 246 | + channel.exchangeDeclare(exchange, "direct", |
| 247 | + false, false, false, args); |
| 248 | + channel.exchangeDelete(exchange); |
| 249 | + }}; |
| 250 | + } |
| 251 | + |
226 | 252 | protected void runConfigureTest(WithName test) |
227 | 253 | throws IOException |
228 | 254 | { |
|
0 commit comments