Renamed field to avoid shadowing

Former-commit-id: 05c0f0784d3ef4aa688e4700c790dc44d9c6d133
This commit is contained in:
Hans Joachim Desserud
2015-06-05 23:39:26 +02:00
parent 12ce2275e0
commit 984a38ce91

View File

@@ -39,7 +39,7 @@ import static org.junit.Assert.assertTrue;
public class DependencyCheckTaskTest { public class DependencyCheckTaskTest {
@Rule @Rule
public BuildFileRule buildFile = new BuildFileRule(); public BuildFileRule buildFileRule = new BuildFileRule();
@Rule @Rule
public ExpectedException expectedException = ExpectedException.none(); public ExpectedException expectedException = ExpectedException.none();
@@ -49,7 +49,7 @@ public class DependencyCheckTaskTest {
Settings.initialize(); Settings.initialize();
BaseDBTestCase.ensureDBExists(); BaseDBTestCase.ensureDBExists();
final String buildFile = this.getClass().getClassLoader().getResource("build.xml").getPath(); final String buildFile = this.getClass().getClassLoader().getResource("build.xml").getPath();
this.buildFile.configureProject(buildFile); buildFileRule.configureProject(buildFile);
} }
@After @After
@@ -70,7 +70,7 @@ public class DependencyCheckTaskTest {
throw new Exception("Unable to delete 'target/DependencyCheck-Report.html' prior to test."); throw new Exception("Unable to delete 'target/DependencyCheck-Report.html' prior to test.");
} }
} }
buildFile.executeTarget("test.fileset"); buildFileRule.executeTarget("test.fileset");
assertTrue("DependencyCheck report was not generated", report.exists()); assertTrue("DependencyCheck report was not generated", report.exists());
@@ -89,7 +89,7 @@ public class DependencyCheckTaskTest {
throw new Exception("Unable to delete 'target/DependencyCheck-Report.xml' prior to test."); throw new Exception("Unable to delete 'target/DependencyCheck-Report.xml' prior to test.");
} }
} }
buildFile.executeTarget("test.filelist"); buildFileRule.executeTarget("test.filelist");
assertTrue("DependencyCheck report was not generated", report.exists()); assertTrue("DependencyCheck report was not generated", report.exists());
} }
@@ -107,7 +107,7 @@ public class DependencyCheckTaskTest {
throw new Exception("Unable to delete 'target/DependencyCheck-Vulnerability.html' prior to test."); throw new Exception("Unable to delete 'target/DependencyCheck-Vulnerability.html' prior to test.");
} }
} }
buildFile.executeTarget("test.dirset"); buildFileRule.executeTarget("test.dirset");
assertTrue("DependencyCheck report was not generated", report.exists()); assertTrue("DependencyCheck report was not generated", report.exists());
} }
@@ -117,6 +117,6 @@ public class DependencyCheckTaskTest {
@Test @Test
public void testGetFailBuildOnCVSS() { public void testGetFailBuildOnCVSS() {
expectedException.expect(BuildException.class); expectedException.expect(BuildException.class);
buildFile.executeTarget("failCVSS"); buildFileRule.executeTarget("failCVSS");
} }
} }