mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-24 18:11:47 +01:00
added more testing
Former-commit-id: 11042b942eb5786a680636d5873e13f84f4398b8
This commit is contained in:
@@ -41,20 +41,21 @@ public class DownloaderIntegrationTest {
|
|||||||
* @throws Exception thrown when an excpetion occurs.
|
* @throws Exception thrown when an excpetion occurs.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testFetchFile_URL_String() throws Exception {
|
public void testFetchFile() throws Exception {
|
||||||
System.out.println("fetchFile");
|
System.out.println("fetchFile");
|
||||||
|
|
||||||
// Settings.setString(Settings.KEYS.PROXY_URL, "test");
|
|
||||||
// Settings.setString(Settings.KEYS.PROXY_PORT, "80");
|
|
||||||
// Settings.setString(Settings.KEYS.CONNECTION_TIMEOUT, "1000");
|
// Settings.setString(Settings.KEYS.CONNECTION_TIMEOUT, "1000");
|
||||||
|
|
||||||
// Settings.setString(Settings.KEYS.PROXY_PORT, "8080");
|
// Settings.setString(Settings.KEYS.PROXY_PORT, "8080");
|
||||||
// Settings.setString(Settings.KEYS.PROXY_URL, "127.0.0.1");
|
// Settings.setString(Settings.KEYS.PROXY_URL, "127.0.0.1");
|
||||||
|
|
||||||
//URL url = new URL(Settings.getString(Settings.KEYS.CPE_URL));
|
URL url = new URL(Settings.getString(Settings.KEYS.CPE_URL));
|
||||||
URL url = new URL("http://static.nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-2010.xml");
|
|
||||||
|
|
||||||
String outputPath = "target\\downloaded_cpe.xml";
|
String outputPath = "target\\downloaded_cpe.xml";
|
||||||
Downloader.fetchFile(url, outputPath);
|
Downloader.fetchFile(url, outputPath, true);
|
||||||
|
|
||||||
|
url = new URL("http://static.nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-2010.xml");
|
||||||
|
outputPath = "target\\downloaded_cve.xml";
|
||||||
|
Downloader.fetchFile(url, outputPath, false);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user