From 7ba6a731ffbb5134ec6c1b22b8965eb01d9cdbe0 Mon Sep 17 00:00:00 2001 From: Jeremy Long Date: Mon, 29 Oct 2012 22:13:26 -0400 Subject: [PATCH] added more testing Former-commit-id: 11042b942eb5786a680636d5873e13f84f4398b8 --- .../utils/DownloaderIntegrationTest.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/test/java/org/codesecure/dependencycheck/utils/DownloaderIntegrationTest.java b/src/test/java/org/codesecure/dependencycheck/utils/DownloaderIntegrationTest.java index a360c519a..f426777a7 100644 --- a/src/test/java/org/codesecure/dependencycheck/utils/DownloaderIntegrationTest.java +++ b/src/test/java/org/codesecure/dependencycheck/utils/DownloaderIntegrationTest.java @@ -41,20 +41,21 @@ public class DownloaderIntegrationTest { * @throws Exception thrown when an excpetion occurs. */ @Test - public void testFetchFile_URL_String() throws Exception { + public void testFetchFile() throws Exception { 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.PROXY_PORT, "8080"); // Settings.setString(Settings.KEYS.PROXY_URL, "127.0.0.1"); - //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"); - + URL url = new URL(Settings.getString(Settings.KEYS.CPE_URL)); 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); + } }