mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-15 00:03:43 +01:00
Update NVD CVE timestamp checking
Former-commit-id: 5764a3ce90b6963d4476f581b712bc9df0c1a7cb
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user