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 TemplateProperties templateProperties;
|
||||
|
||||
private Rule rule;
|
||||
|
||||
private Path fragment;
|
||||
|
||||
private Path fragments;
|
||||
|
||||
@org.junit.Rule
|
||||
|
@ -39,7 +35,7 @@ public class DefaultRuleReadmeLoaderTest {
|
|||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
templateProperties = new TemplateProperties();
|
||||
final TemplateProperties templateProperties = new TemplateProperties();
|
||||
fragments = folder.newFolder("fragments")
|
||||
.toPath();
|
||||
templateProperties.setReadmeFragments(fragments);
|
||||
|
@ -53,8 +49,8 @@ public class DefaultRuleReadmeLoaderTest {
|
|||
public void loadEnabledOkay() throws IOException {
|
||||
//given
|
||||
rule.setEnabled(true);
|
||||
fragment = fragments.resolve("name.md");
|
||||
Files.write(fragment, Arrays.asList("", "body"));
|
||||
final Path fragment1 = fragments.resolve("name.md");
|
||||
Files.write(fragment1, Arrays.asList("", "body"));
|
||||
//when
|
||||
val fragment = loader.load(rule);
|
||||
//then
|
||||
|
|
Loading…
Reference in a new issue