codacy cleanup

This commit is contained in:
Jeremy Long
2017-03-10 15:38:00 -05:00
parent 32590ab7ff
commit dfc6d952bd
4 changed files with 2 additions and 22 deletions

View File

@@ -24,7 +24,6 @@ import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.net.URL;
import java.util.Properties;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;

View File

@@ -26,7 +26,6 @@ import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.owasp.dependencycheck.data.nvdcve.CveDB;
import org.owasp.dependencycheck.utils.Settings;
import org.slf4j.Logger;
@@ -44,10 +43,6 @@ public abstract class BaseDBTestCase extends BaseTest {
private final static Logger LOGGER = LoggerFactory.getLogger(BaseDBTestCase.class);
// @BeforeClass
// public static void setUpClass() throws Exception {
// BaseTest.setUpClass();
// }
@Before
public void setUpDb() throws Exception {
ensureDBExists();

View File

@@ -34,19 +34,6 @@ import org.owasp.dependencycheck.dependency.VulnerableSoftware;
*/
public class CveDBMySQLTest extends BaseTest {
/**
* Pretty useless tests of open, commit, and close methods, of class CveDB.
*/
@Test
public void testOpen() {
try {
CveDB instance = CveDB.getInstance();
} catch (DatabaseException ex) {
System.out.println("Unable to connect to the My SQL database; verify that the db server is running and that the schema has been generated");
fail(ex.getMessage());
}
}
/**
* Test of getCPEs method, of class CveDB.
*/
@@ -55,7 +42,7 @@ public class CveDBMySQLTest extends BaseTest {
CveDB instance = CveDB.getInstance();
try {
String vendor = "apache";
String product = "struts";
String product = "struts";
Set<VulnerableSoftware> result = instance.getCPEs(vendor, product);
assertTrue("Has data been loaded into the MySQL DB? if not consider using the CLI to populate it", result.size() > 5);
} catch (Exception ex) {
@@ -77,6 +64,6 @@ public class CveDBMySQLTest extends BaseTest {
} catch (Exception ex) {
System.out.println("Unable to access the My SQL database; verify that the db server is running and that the schema has been generated");
throw ex;
}
}
}
}

View File

@@ -21,7 +21,6 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
import org.junit.Test;
import org.owasp.dependencycheck.BaseTest;
import org.owasp.dependencycheck.data.nvdcve.CveDB;
import org.owasp.dependencycheck.data.update.exception.UpdateException;
import org.owasp.dependencycheck.data.update.nvd.UpdateableNvdCve;