Merge pull request #44 from kemitix/kcr-33-34-35-36-local-variables
KCR33,34,35 & 36 local variables
This commit is contained in:
commit
94a5faebcb
2 changed files with 9 additions and 19 deletions
|
@ -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")
|
||||
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")
|
||||
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 =
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue