mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-21 08:39:24 +01:00
added test case
This commit is contained in:
@@ -358,6 +358,14 @@ public class SuppressionRuleTest extends BaseTest {
|
|||||||
result = instance.identifierMatches("cpe", cpe, identifier);
|
result = instance.identifierMatches("cpe", cpe, identifier);
|
||||||
assertEquals(expResult, result);
|
assertEquals(expResult, result);
|
||||||
|
|
||||||
|
identifier = new Identifier("cpe", "cpe:/a:apache:tomcat:7.0", "some url not needed for this test");
|
||||||
|
cpe.setValue("cpe:/a:apache:tomcat");
|
||||||
|
cpe.setRegex(false);
|
||||||
|
cpe.setCaseSensitive(false);
|
||||||
|
expResult = true;
|
||||||
|
result = instance.identifierMatches("cpe", cpe, identifier);
|
||||||
|
assertEquals(expResult, result);
|
||||||
|
|
||||||
identifier = new Identifier("maven", "org.springframework:spring-core:2.5.5", "https://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=org.springframework&a=spring-core&v=2.5.5&e=jar");
|
identifier = new Identifier("maven", "org.springframework:spring-core:2.5.5", "https://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=org.springframework&a=spring-core&v=2.5.5&e=jar");
|
||||||
cpe.setValue("org.springframework:spring-core:2.5.5");
|
cpe.setValue("org.springframework:spring-core:2.5.5");
|
||||||
cpe.setRegex(false);
|
cpe.setRegex(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user