From 126347cfe7b27bd50e6890da4602f97f905f289e Mon Sep 17 00:00:00 2001 From: Johannes Beck Date: Sun, 25 Feb 2024 13:34:47 +0100 Subject: [PATCH] Identataion only --- src/test/java/x1/stomp/test/ContainerTest.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/test/java/x1/stomp/test/ContainerTest.java b/src/test/java/x1/stomp/test/ContainerTest.java index fe72eeec..2c9d5eea 100644 --- a/src/test/java/x1/stomp/test/ContainerTest.java +++ b/src/test/java/x1/stomp/test/ContainerTest.java @@ -39,15 +39,17 @@ public class ContainerTest { private static final String PATH_PARAM_KEY = "{key}"; private static final String PARAM_KEY = "key"; private static final String TEST_SHARE = "AAPL"; - private static final String TEST_SHARE_INVALID = "XXXX"; private static Network network = Network.builder().build(); @Container private static PostgreSQLContainer postgres = new PostgreSQLContainer<>("postgres:15-alpine") - .withNetwork(network).withNetworkAliases("postgres").withDatabaseName("stocks") - .withInitScript("init.sql"); + .withNetwork(network) + .withNetworkAliases("postgres") + .withDatabaseName("stocks") + .withInitScript("init.sql"); + @SuppressWarnings("rawtypes") @Container private static GenericContainer wildfly = new GenericContainer(DockerImageName.parse("registry.x1/j7beck/x1-wildfly-stomp-test:1.8")) .dependsOn(postgres).withNetwork(network) @@ -80,7 +82,7 @@ public void tearDown() { @Test public void testFindShareNotFound() { try (var response = client.target(baseUrl).path(PATH_SHARES).path(PATH_PARAM_KEY) - .resolveTemplate(PARAM_KEY, TEST_SHARE).request(APPLICATION_JSON).get()) { + .resolveTemplate(PARAM_KEY, TEST_SHARE).request(APPLICATION_JSON).get()) { assertThat(response).hasStatus(NOT_FOUND); } } @@ -91,14 +93,14 @@ public void testAddShareInvalid() { var share = new Share(key); try (var response = client.target(baseUrl).path(PATH_SHARES).request(APPLICATION_JSON) - .post(Entity.entity(share, MediaType.APPLICATION_XML))) { + .post(Entity.entity(share, MediaType.APPLICATION_XML))) { assertThat(response).hasStatus(BAD_REQUEST); var errorResponse = response.readEntity(ErrorResponse.class); assertThat(errorResponse).isNotNull().containsErrors(2).hasRequestUri().hasType("Invalid data"); } try (var response = client.target(baseUrl).path(PATH_SHARES).path(PATH_PARAM_KEY).resolveTemplate(PARAM_KEY, key) - .request(APPLICATION_JSON).get()) { + .request(APPLICATION_JSON).get()) { assertThat(response).hasStatus(NOT_FOUND); } }