mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-22 17:19:30 +01:00
updated settings initialization
Former-commit-id: 87d35b16ee7cf213ca317fd98470bc027aca9af1
This commit is contained in:
@@ -18,12 +18,9 @@
|
|||||||
package org.owasp.dependencycheck.taskdefs;
|
package org.owasp.dependencycheck.taskdefs;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import static junit.framework.TestCase.assertTrue;
|
|
||||||
import org.apache.tools.ant.BuildFileTest;
|
import org.apache.tools.ant.BuildFileTest;
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.AfterClass;
|
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.BeforeClass;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.owasp.dependencycheck.data.nvdcve.BaseDBTestCase;
|
import org.owasp.dependencycheck.data.nvdcve.BaseDBTestCase;
|
||||||
import org.owasp.dependencycheck.utils.Settings;
|
import org.owasp.dependencycheck.utils.Settings;
|
||||||
@@ -34,22 +31,10 @@ import org.owasp.dependencycheck.utils.Settings;
|
|||||||
*/
|
*/
|
||||||
public class DependencyCheckTaskTest extends BuildFileTest {
|
public class DependencyCheckTaskTest extends BuildFileTest {
|
||||||
|
|
||||||
public DependencyCheckTaskTest() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@BeforeClass
|
|
||||||
public static void setUpClass() throws Exception {
|
|
||||||
Settings.initialize();
|
|
||||||
}
|
|
||||||
|
|
||||||
@AfterClass
|
|
||||||
public static void tearDownClass() throws Exception {
|
|
||||||
Settings.cleanup();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
@Override
|
@Override
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
|
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();
|
||||||
configureProject(buildFile);
|
configureProject(buildFile);
|
||||||
@@ -60,6 +45,7 @@ public class DependencyCheckTaskTest extends BuildFileTest {
|
|||||||
public void tearDown() {
|
public void tearDown() {
|
||||||
//no cleanup...
|
//no cleanup...
|
||||||
//executeTarget("cleanup");
|
//executeTarget("cleanup");
|
||||||
|
Settings.cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user