mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-15 08:13:43 +01:00
initial release
This commit is contained in:
@@ -31,7 +31,7 @@ public abstract class BaseIndexTestCase extends TestCase {
|
||||
}
|
||||
|
||||
protected void ensureIndexExists() throws Exception {
|
||||
String indexPath = Settings.getString("index.cpe");
|
||||
String indexPath = Settings.getString("cpe");
|
||||
java.io.File f = new File(indexPath);
|
||||
if (!f.exists()) {
|
||||
f.mkdirs();
|
||||
|
||||
@@ -336,9 +336,8 @@ public class CliParserTest extends TestCase {
|
||||
baos.flush();
|
||||
String text = (new String(baos.toByteArray()));
|
||||
String[] lines = text.split(System.getProperty("line.separator"));
|
||||
assertEquals("usage: DependencyCheck [-a <name>] [-c <file> | -s <path>] [-h] [-o", lines[0]);
|
||||
assertEquals(" <folder>] [-v]", lines[1]);
|
||||
assertEquals(8, lines.length);
|
||||
assertTrue(lines[0].startsWith("usage: "));
|
||||
assertTrue((lines.length>2));
|
||||
} catch (IOException ex) {
|
||||
System.setOut(out);
|
||||
fail("CliParser.printVersionInfo did not write anything to system.out.");
|
||||
|
||||
@@ -36,15 +36,17 @@ public class DownloaderTest {
|
||||
public void tearDown() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test of fetchFile method, of class Downloader.
|
||||
* @throws Exception thrown when an excpetion occurs.
|
||||
*/
|
||||
@Test
|
||||
public void testFetchFile_URL_String() throws Exception {
|
||||
System.out.println("fetchFile");
|
||||
URL url = new URL(Settings.getString(Settings.KEYS.CPE_URL));
|
||||
String outputPath = "target\\downloaded_cpe.xml";
|
||||
Downloader.fetchFile(url, outputPath);
|
||||
}
|
||||
|
||||
//This test is being removed because it is a bit too slow.
|
||||
// /**
|
||||
// * Test of fetchFile method, of class Downloader.
|
||||
// * @throws Exception thrown when an excpetion occurs.
|
||||
// */
|
||||
// @Test
|
||||
// public void testFetchFile_URL_String() throws Exception {
|
||||
// System.out.println("fetchFile");
|
||||
// URL url = new URL(Settings.getString(Settings.KEYS.CPE_URL));
|
||||
// String outputPath = "target\\downloaded_cpe.xml";
|
||||
// Downloader.fetchFile(url, outputPath);
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user