From 077e60ffd407bbddbc5dbb53e5cd524040773b56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Enrique=20Garc=C3=ADa=20Maci=C3=B1eiras?= Date: Mon, 22 Jan 2024 20:46:52 +0100 Subject: [PATCH] #384 fix styles --- .../asyncapi/AsyncApiExtractorImplTest.java | 6 ++--- .../kloadgen/sampler/AsyncApiSamplerTest.java | 22 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/test/java/com/sngular/kloadgen/extractor/asyncapi/AsyncApiExtractorImplTest.java b/src/test/java/com/sngular/kloadgen/extractor/asyncapi/AsyncApiExtractorImplTest.java index 69a8b654..6aa74dfb 100644 --- a/src/test/java/com/sngular/kloadgen/extractor/asyncapi/AsyncApiExtractorImplTest.java +++ b/src/test/java/com/sngular/kloadgen/extractor/asyncapi/AsyncApiExtractorImplTest.java @@ -42,9 +42,9 @@ void testExtractFile() { Assertions.assertThat(asapfle).isNotNull(); Assertions.assertThat(asapfle.getApiSchemaList().toString()).isEqualTo("{user_signedup=user_signedup}"); - Assertions.assertThat(asapfle.getApiServerMap().toString()).isEqualTo("{production=AsyncApiServer(name=production," + - " url=mqtt://test.mosquitto.org, protocol=mqtt," + - " description=Test MQTT broker)}"); + Assertions.assertThat(asapfle.getApiServerMap().toString()).isEqualTo("{production=AsyncApiServer(name=production," + + " url=mqtt://test.mosquitto.org, protocol=mqtt," + + " description=Test MQTT broker)}"); } @Test diff --git a/src/test/java/com/sngular/kloadgen/sampler/AsyncApiSamplerTest.java b/src/test/java/com/sngular/kloadgen/sampler/AsyncApiSamplerTest.java index 1b294c0e..bb1056a4 100644 --- a/src/test/java/com/sngular/kloadgen/sampler/AsyncApiSamplerTest.java +++ b/src/test/java/com/sngular/kloadgen/sampler/AsyncApiSamplerTest.java @@ -98,15 +98,15 @@ void testAsyncApiSampleBasic() { public static List getMappings() { - List mappings = new ArrayList<>(); - JsonNode serversNode = asyncApiFileNode.getAsyncApiFileNode().path("servers"); + final List mappings = new ArrayList<>(); + final JsonNode serversNode = asyncApiFileNode.getAsyncApiFileNode().path("servers"); if (serversNode != null) { - Iterator serverNodes = serversNode.elements(); + final Iterator serverNodes = serversNode.elements(); while (serverNodes.hasNext()) { - JsonNode serverNode = serverNodes.next(); - String serverUrl = serverNode.get("url").asText(); - String serverProtocol = serverNode.get("protocol").asText(); - String serverDescription = serverNode.get("description").asText(); + final JsonNode serverNode = serverNodes.next(); + final String serverUrl = serverNode.get("url").asText(); + final String serverProtocol = serverNode.get("protocol").asText(); + final String serverDescription = serverNode.get("description").asText(); mappings.add(new PropertyMapping("url", serverUrl)); mappings.add(new PropertyMapping("protocol", serverProtocol)); @@ -120,15 +120,15 @@ public static List getListFieldValueMapping() { int i = 0; String field = null; - List fieldValueMappings = new ArrayList<>(); - JsonNode valueFields = asyncApiFileNode.getAsyncApiFileNode().path("components") + final List fieldValueMappings = new ArrayList<>(); + final JsonNode valueFields = asyncApiFileNode.getAsyncApiFileNode().path("components") .path("schemas") .path("userSignedUpPayload") .path("properties"); if (valueFields != null) { - Iterator fieldValuesNodes = valueFields.elements(); + final Iterator fieldValuesNodes = valueFields.elements(); while (fieldValuesNodes.hasNext()) { - JsonNode fieldValuesNode = fieldValuesNodes.next(); + final JsonNode fieldValuesNode = fieldValuesNodes.next(); String type = fieldValuesNode.get("type").toString().replaceAll("\"", ""); type = type.replaceAll("'", ""); String value = fieldValuesNode.get("description").toString().replaceAll("\"", "");