Update NVD CVE timestamp checking

Former-commit-id: 5764a3ce90b6963d4476f581b712bc9df0c1a7cb
This commit is contained in:
Jeremy Long
2012-12-30 08:53:14 -05:00
parent 40e4f9cd90
commit d4f097cfbc
8 changed files with 298 additions and 519 deletions

View File

@@ -5,8 +5,6 @@
package org.codesecure.dependencycheck.dependency;
import java.io.File;
import org.codesecure.dependencycheck.dependency.Dependency;
import org.codesecure.dependencycheck.dependency.Evidence;
import java.util.List;
import org.junit.After;
import org.junit.AfterClass;

View File

@@ -10,6 +10,7 @@ import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
/**
*
@@ -58,4 +59,12 @@ public class DownloaderIntegrationTest {
Downloader.fetchFile(url, outputPath, false);
}
@Test
public void testGetLastModified() throws Exception {
System.out.println("getLastModified");
URL url = new URL("http://nvd.nist.gov/download/nvdcve-2012.xml");
long timestamp = Downloader.getLastModified(url);
assertTrue("timestamp equal to zero?", timestamp>0);
}
}

View File

@@ -6,7 +6,6 @@ package org.codesecure.dependencycheck.utils;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.URISyntaxException;
import junit.framework.TestCase;
import org.junit.Test;