KCR31: builder: DefaultRuleReadmeLoaderTest: make field local
* fragment (Fixes #31) * templateProperties (Fixes #32)
This commit is contained in:
parent
d7454a1155
commit
27806fb2a2
1 changed files with 3 additions and 7 deletions
|
@ -23,12 +23,8 @@ public class DefaultRuleReadmeLoaderTest {
|
||||||
|
|
||||||
private RuleReadmeLoader loader;
|
private RuleReadmeLoader loader;
|
||||||
|
|
||||||
private TemplateProperties templateProperties;
|
|
||||||
|
|
||||||
private Rule rule;
|
private Rule rule;
|
||||||
|
|
||||||
private Path fragment;
|
|
||||||
|
|
||||||
private Path fragments;
|
private Path fragments;
|
||||||
|
|
||||||
@org.junit.Rule
|
@org.junit.Rule
|
||||||
|
@ -39,7 +35,7 @@ public class DefaultRuleReadmeLoaderTest {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
templateProperties = new TemplateProperties();
|
final TemplateProperties templateProperties = new TemplateProperties();
|
||||||
fragments = folder.newFolder("fragments")
|
fragments = folder.newFolder("fragments")
|
||||||
.toPath();
|
.toPath();
|
||||||
templateProperties.setReadmeFragments(fragments);
|
templateProperties.setReadmeFragments(fragments);
|
||||||
|
@ -53,8 +49,8 @@ public class DefaultRuleReadmeLoaderTest {
|
||||||
public void loadEnabledOkay() throws IOException {
|
public void loadEnabledOkay() throws IOException {
|
||||||
//given
|
//given
|
||||||
rule.setEnabled(true);
|
rule.setEnabled(true);
|
||||||
fragment = fragments.resolve("name.md");
|
final Path fragment1 = fragments.resolve("name.md");
|
||||||
Files.write(fragment, Arrays.asList("", "body"));
|
Files.write(fragment1, Arrays.asList("", "body"));
|
||||||
//when
|
//when
|
||||||
val fragment = loader.load(rule);
|
val fragment = loader.load(rule);
|
||||||
//then
|
//then
|
||||||
|
|
Loading…
Reference in a new issue