This is an automated email from the ASF dual-hosted git repository. bvahdat pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new 9ec61d7 let's hold on using the junit 5.x API 9ec61d7 is described below commit 9ec61d7b74f59ecf7e024507d2709a8c18287128 Author: Babak Vahdat <bvah...@apache.org> AuthorDate: Fri Jul 31 00:29:42 2020 +0200 let's hold on using the junit 5.x API --- .../component/rabbitmq/RabbitMQEndpointTest.java | 20 ++++++++++---------- .../rabbitmq/integration/RabbitMQInOutIntTest.java | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/components/camel-rabbitmq/src/test/java/org/apache/camel/component/rabbitmq/RabbitMQEndpointTest.java b/components/camel-rabbitmq/src/test/java/org/apache/camel/component/rabbitmq/RabbitMQEndpointTest.java index 3c4e57d..a5005fa 100644 --- a/components/camel-rabbitmq/src/test/java/org/apache/camel/component/rabbitmq/RabbitMQEndpointTest.java +++ b/components/camel-rabbitmq/src/test/java/org/apache/camel/component/rabbitmq/RabbitMQEndpointTest.java @@ -38,7 +38,6 @@ import org.apache.camel.component.rabbitmq.integration.RabbitMQDeadLetterRouting import org.apache.camel.spi.Registry; import org.apache.camel.support.SimpleRegistry; import org.apache.camel.test.junit5.CamelTestSupport; -import org.junit.Assert; import org.junit.jupiter.api.Test; import org.mockito.Mockito; import org.slf4j.Logger; @@ -48,6 +47,7 @@ import static org.apache.camel.test.junit5.TestSupport.assertIsInstanceOf; import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; public class RabbitMQEndpointTest extends CamelTestSupport { @@ -61,15 +61,15 @@ public class RabbitMQEndpointTest extends CamelTestSupport { protected Registry createCamelRegistry() throws Exception { SimpleRegistry registry = new SimpleRegistry(); - HashMap<String, Object> args = new HashMap<>(); + Map<String, Object> args = new HashMap<>(); args.put("foo", "bar"); registry.bind("args", args); - HashMap<String, Object> moreArgs = new HashMap<>(); + Map<String, Object> moreArgs = new HashMap<>(); moreArgs.put("fizz", "buzz"); registry.bind("moreArgs", moreArgs); - HashMap<String, Object> evenMoreArgs = new HashMap<>(); + Map<String, Object> evenMoreArgs = new HashMap<>(); evenMoreArgs.put("ping", "pong"); registry.bind("evenMoreArgs", evenMoreArgs); @@ -308,12 +308,12 @@ public class RabbitMQEndpointTest extends CamelTestSupport { + "&routingKey=testKey&username=me&password=mypwd&threadPoolSize=1&concurrentConsumers=1&autoDelete=false" + "&vhost=myvhost&arg.queue.x-single-active-consumer=true&arg.exchange.x-delayed-type=direct&exchangeType=x-delayed-message", RabbitMQEndpoint.class); - Assert.assertNotNull(endpoint1.getArgs()); - Assert.assertEquals(2, endpoint1.getArgs().size()); - Assert.assertNotNull(endpoint1.getExchangeArgs()); - Assert.assertEquals(1, endpoint1.getExchangeArgs().size()); - Assert.assertNotNull(endpoint1.getQueueArgs()); - Assert.assertEquals(1, endpoint1.getQueueArgs().size()); + assertNotNull(endpoint1.getArgs()); + assertEquals(2, endpoint1.getArgs().size()); + assertNotNull(endpoint1.getExchangeArgs()); + assertEquals(1, endpoint1.getExchangeArgs().size()); + assertNotNull(endpoint1.getQueueArgs()); + assertEquals(1, endpoint1.getQueueArgs().size()); } } diff --git a/components/camel-rabbitmq/src/test/java/org/apache/camel/component/rabbitmq/integration/RabbitMQInOutIntTest.java b/components/camel-rabbitmq/src/test/java/org/apache/camel/component/rabbitmq/integration/RabbitMQInOutIntTest.java index 605d477..05c7147 100644 --- a/components/camel-rabbitmq/src/test/java/org/apache/camel/component/rabbitmq/integration/RabbitMQInOutIntTest.java +++ b/components/camel-rabbitmq/src/test/java/org/apache/camel/component/rabbitmq/integration/RabbitMQInOutIntTest.java @@ -79,7 +79,7 @@ public class RabbitMQInOutIntTest extends AbstractRabbitMQIntTest { protected Registry createCamelRegistry() throws Exception { SimpleRegistry reg = new SimpleRegistry(); - HashMap<String, Object> args = new HashMap<>(); + Map<String, Object> args = new HashMap<>(); args.put(RabbitMQConstants.RABBITMQ_QUEUE_TTL_KEY, 60000); reg.bind("args", args);