diff --git a/builder/src/test/java/net/kemitix/checkstyle/ruleset/builder/CheckstyleWriterTest.java b/builder/src/test/java/net/kemitix/checkstyle/ruleset/builder/CheckstyleWriterTest.java index 8874b1e..2412652 100644 --- a/builder/src/test/java/net/kemitix/checkstyle/ruleset/builder/CheckstyleWriterTest.java +++ b/builder/src/test/java/net/kemitix/checkstyle/ruleset/builder/CheckstyleWriterTest.java @@ -88,7 +88,7 @@ public class CheckstyleWriterTest { //when checkstyleWriter.run(); //then - final List lines = loadOutputFile(RuleLevel.LAYOUT); + val lines = loadOutputFile(RuleLevel.LAYOUT); assertThat(lines).containsExactly("C:", String.format("TW:", ruleName)); } @@ -102,7 +102,7 @@ public class CheckstyleWriterTest { //when checkstyleWriter.run(); //then - final List lines = loadOutputFile(RuleLevel.NAMING); + val lines = loadOutputFile(RuleLevel.NAMING); assertThat(lines).containsExactly("C:", String.format("TW:", ruleName)); } @@ -116,7 +116,7 @@ public class CheckstyleWriterTest { //when checkstyleWriter.run(); //then - final List lines = loadOutputFile(RuleLevel.LAYOUT); + val lines = loadOutputFile(RuleLevel.LAYOUT); assertThat(lines).containsExactly(String.format("C:", ruleName), "TW:"); } @@ -132,7 +132,7 @@ public class CheckstyleWriterTest { //when checkstyleWriter.run(); //then - final List lines = loadOutputFile(RuleLevel.LAYOUT); + val lines = loadOutputFile(RuleLevel.LAYOUT); assertThat(lines).containsExactly("C:", String.format("TW:", ruleName), " ", "" ); @@ -148,7 +148,7 @@ public class CheckstyleWriterTest { //when checkstyleWriter.run(); //then - final List lines = loadOutputFile(RuleLevel.LAYOUT); + val lines = loadOutputFile(RuleLevel.LAYOUT); assertThat(lines).containsExactly("C:", "TW:"); } @@ -162,7 +162,7 @@ public class CheckstyleWriterTest { //when checkstyleWriter.run(); //then - final List lines = loadOutputFile(RuleLevel.LAYOUT); + val lines = loadOutputFile(RuleLevel.LAYOUT); assertThat(lines).containsExactly("C:", "TW:"); } @@ -194,10 +194,10 @@ public class CheckstyleWriterTest { } private List loadOutputFile(final RuleLevel level) throws IOException { - final Path file = outputDirectory.resolve(outputFiles.get(level)); - assertThat(file).as("Output file exists") + val path = outputDirectory.resolve(outputFiles.get(level)); + assertThat(path).as("Output path exists") .exists(); - return Files.readAllLines(file, StandardCharsets.UTF_8); + return Files.readAllLines(path, StandardCharsets.UTF_8); } private Rule enabledRule(final RuleLevel level, final RuleParent parent) {