diff --git a/builder/src/test/java/net/kemitix/checkstyle/ruleset/builder/ReadmeWriterTest.java b/builder/src/test/java/net/kemitix/checkstyle/ruleset/builder/ReadmeWriterTest.java index bc45598..51ad769 100644 --- a/builder/src/test/java/net/kemitix/checkstyle/ruleset/builder/ReadmeWriterTest.java +++ b/builder/src/test/java/net/kemitix/checkstyle/ruleset/builder/ReadmeWriterTest.java @@ -25,10 +25,6 @@ public class ReadmeWriterTest { private ReadmeWriter readmeWriter; - private TemplateProperties templateProperties; - - private OutputProperties outputProperties; - private RulesProperties rulesProperties; @Mock @@ -37,10 +33,6 @@ public class ReadmeWriterTest { @Mock private ReadmeIndexBuilder indexBuilder; - private Path template; - - private Path fragments; - private Path readme; @org.junit.Rule @@ -49,17 +41,17 @@ public class ReadmeWriterTest { @Before public void setUp() throws Exception { MockitoAnnotations.initMocks(this); - template = folder.newFile("README-template.md") - .toPath(); + final Path template = folder.newFile("README-template.md") + .toPath(); Files.write(template, Arrays.asList("i:%s", "ce:%s", "se:%s", "cd:%s", "sd:%s")); - fragments = folder.newFolder("fragments") - .toPath(); + final TemplateProperties templateProperties = new TemplateProperties(); + templateProperties.setReadmeTemplate(template); + final Path fragments = folder.newFolder("fragments") + .toPath(); + templateProperties.setReadmeFragments(fragments); + final OutputProperties outputProperties = new OutputProperties(); readme = folder.newFile("README.md") .toPath(); - templateProperties = new TemplateProperties(); - templateProperties.setReadmeTemplate(template); - templateProperties.setReadmeFragments(fragments); - outputProperties = new OutputProperties(); outputProperties.setReadme(readme); rulesProperties = new RulesProperties(); readmeWriter = diff --git a/plugin/src/test/java/net/kemitix/checkstyle/ruleset/plugin/DefaultCheckstyleExecutorTest.java b/plugin/src/test/java/net/kemitix/checkstyle/ruleset/plugin/DefaultCheckstyleExecutorTest.java index b230eeb..8abc7b1 100644 --- a/plugin/src/test/java/net/kemitix/checkstyle/ruleset/plugin/DefaultCheckstyleExecutorTest.java +++ b/plugin/src/test/java/net/kemitix/checkstyle/ruleset/plugin/DefaultCheckstyleExecutorTest.java @@ -72,8 +72,6 @@ public class DefaultCheckstyleExecutorTest { @Mock private Artifact artifact; - private File artifactFile; - @Mock private MavenXpp3Reader mavenXpp3Reader; @@ -122,8 +120,8 @@ public class DefaultCheckstyleExecutorTest { .level(level) .build(); - artifactFile = folder.newFile("pom.xml"); given(artifactRepository.find(any())).willReturn(artifact); + final File artifactFile = folder.newFile("pom.xml"); given(artifact.getFile()).willReturn(artifactFile); given(mavenXpp3Reader.read(any(FileReader.class))).willReturn(pomModel); final Properties properties = new Properties();