mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-27 19:41:38 +01:00
Renamed field to avoid shadowing
Former-commit-id: 05c0f0784d3ef4aa688e4700c790dc44d9c6d133
This commit is contained in:
@@ -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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user