mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-14 15:53:36 +01:00
added test for isAffected
Former-commit-id: 36a6d28ff03e41307574ee40381b0833c5c4ab01
This commit is contained in:
@@ -19,9 +19,11 @@ package org.owasp.dependencycheck.data.nvdcve;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import org.junit.Test;
|
||||
import org.owasp.dependencycheck.dependency.VulnerableSoftware;
|
||||
import org.owasp.dependencycheck.utils.DependencyVersion;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -72,4 +74,21 @@ public class CveDBIntegrationTest extends BaseDBTestCase {
|
||||
instance.close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test of isAffected method, of class CveDB.
|
||||
*/
|
||||
@Test
|
||||
public void testIsAffected() throws Exception {
|
||||
String vendor = "openssl";
|
||||
String product = "openssl";
|
||||
DependencyVersion identifiedVersion = new DependencyVersion("1.0.1o");
|
||||
String cpeId = "cpe:/a:openssl:openssl:1.0.1e";
|
||||
String previous = "y";
|
||||
|
||||
CveDB instance = new CveDB();
|
||||
assertFalse(instance.isAffected(vendor, product, identifiedVersion, cpeId, previous));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user