added more testing

Former-commit-id: 11042b942eb5786a680636d5873e13f84f4398b8
This commit is contained in:
Jeremy Long
2012-10-29 22:13:26 -04:00
parent 8315d43f54
commit 7ba6a731ff

View File

@@ -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);
}
}