Skip to content

Commit

Permalink
#384 fix styles
Browse files Browse the repository at this point in the history
  • Loading branch information
jemacineiras committed Jan 22, 2024
1 parent 3273838 commit 077e60f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 11 additions & 11 deletions src/test/java/com/sngular/kloadgen/sampler/AsyncApiSamplerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ void testAsyncApiSampleBasic() {

public static List<PropertyMapping> getMappings() {

List<PropertyMapping> mappings = new ArrayList<>();
JsonNode serversNode = asyncApiFileNode.getAsyncApiFileNode().path("servers");
final List<PropertyMapping> mappings = new ArrayList<>();
final JsonNode serversNode = asyncApiFileNode.getAsyncApiFileNode().path("servers");
if (serversNode != null) {
Iterator<JsonNode> serverNodes = serversNode.elements();
final Iterator<JsonNode> 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));
Expand All @@ -120,15 +120,15 @@ public static List<FieldValueMapping> getListFieldValueMapping() {

int i = 0;
String field = null;
List<FieldValueMapping> fieldValueMappings = new ArrayList<>();
JsonNode valueFields = asyncApiFileNode.getAsyncApiFileNode().path("components")
final List<FieldValueMapping> fieldValueMappings = new ArrayList<>();
final JsonNode valueFields = asyncApiFileNode.getAsyncApiFileNode().path("components")
.path("schemas")
.path("userSignedUpPayload")
.path("properties");
if (valueFields != null) {
Iterator<JsonNode> fieldValuesNodes = valueFields.elements();
final Iterator<JsonNode> 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("\"", "");
Expand Down

0 comments on commit 077e60f

Please sign in to comment.