KXR36: plugin: DefaultCheckstyleExecutorTest: artifactFile: make local variable

This commit is contained in:
Paul Campbell 2017-05-29 13:31:56 +01:00
parent 701b64e2c6
commit 4cca4286a1

View file

@ -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();