This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit 657d4c6e3e50c7b0ad7296572928c0162a869c38 Author: Andrea Cosentino <[email protected]> AuthorDate: Tue Nov 17 15:09:16 2020 +0100 CAMEL-15836 - Camel-AWS2-SES: enable autowire on the SES Client, fixed tests --- .../aws2/ses/SESComponentClientRegistryTest.java | 25 +--------------------- 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/components/camel-aws2-ses/src/test/java/org/apache/camel/component/aws2/ses/SESComponentClientRegistryTest.java b/components/camel-aws2-ses/src/test/java/org/apache/camel/component/aws2/ses/SESComponentClientRegistryTest.java index 637446a..5b9fb37f 100644 --- a/components/camel-aws2-ses/src/test/java/org/apache/camel/component/aws2/ses/SESComponentClientRegistryTest.java +++ b/components/camel-aws2-ses/src/test/java/org/apache/camel/component/aws2/ses/SESComponentClientRegistryTest.java @@ -20,7 +20,6 @@ import org.apache.camel.test.junit5.CamelTestSupport; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertNotSame; import static org.junit.jupiter.api.Assertions.assertSame; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -39,29 +38,7 @@ public class SESComponentClientRegistryTest extends CamelTestSupport { } @Test - public void createEndpointWithMinimalSESClientMisconfiguration() throws Exception { - - Ses2Component component = new Ses2Component(context); - assertThrows(IllegalArgumentException.class, () -> { - component.createEndpoint("aws2-ses://[email protected]"); - }); - component.close(); - } - - @Test - public void createEndpointWithAutoDiscoverClientFalse() throws Exception { - - AmazonSESClientMock awsSESClient = new AmazonSESClientMock(); - context.getRegistry().bind("awsSesClient", awsSESClient); - Ses2Component component = context.getComponent("aws2-ses", Ses2Component.class); - Ses2Endpoint endpoint = (Ses2Endpoint) component - .createEndpoint("aws2-ses://[email protected]?accessKey=xxx&secretKey=yyy&autoDiscoverClient=false"); - - assertNotSame(awsSESClient, endpoint.getConfiguration().getAmazonSESClient()); - } - - @Test - public void createEndpointWithAutoDiscoverClientTrue() throws Exception { + public void createEndpointWithAutowire() throws Exception { AmazonSESClientMock awsSESClient = new AmazonSESClientMock(); context.getRegistry().bind("awsSesClient", awsSESClient);
