From 7e07b493e3678a1e98c62c79f4a894f018e9da97 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Thu, 28 Mar 2024 01:47:32 +0100 Subject: [PATCH] fix(impl): [#199] Improve variable naming --- .../org/eclipse/tractusx/irs/IrsApplicationTests.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/IrsApplicationTests.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/IrsApplicationTests.java index 8fc619a1e5..c3b0e50fc1 100644 --- a/irs-api/src/test/java/org/eclipse/tractusx/irs/IrsApplicationTests.java +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/IrsApplicationTests.java @@ -77,11 +77,12 @@ class IrsApplicationTests { @Test void generatedOpenApiMatchesContract() throws Exception { - final String generatedYaml = this.restTemplate.getForObject("http://localhost:" + port + "/api/api-docs.yaml", String.class); - final InputStream fixedYaml = Files.newInputStream(Path.of("../docs/src/api/irs-api.yaml")); + final String generatedYaml = this.restTemplate.getForObject("http://localhost:" + port + "/api/api-docs.yaml", + String.class); + final InputStream definedYaml = Files.newInputStream(Path.of("../docs/src/api/irs-api.yaml")); final ObjectMapper mapper = new ObjectMapper(new YAMLFactory()); - final Map fixedYamlMap = mapper.readerForMapOf(Object.class).readValue(fixedYaml); + final Map definedYamlMap = mapper.readerForMapOf(Object.class).readValue(definedYaml); final Map generatedYamlMap = mapper.readerForMapOf(Object.class).readValue(generatedYaml); // To correctly display both documentations examples - manual and generated by annotations - @@ -93,7 +94,8 @@ void generatedOpenApiMatchesContract() throws Exception { .ignoringFields("components.schemas.Jobs.example") .ignoringFields("components.schemas.Policy") .ignoringFields("components.schemas.BatchResponse.example") - .isEqualTo(fixedYamlMap); + .isEqualTo(definedYamlMap); + } @Test