Search in sources :

Example 6 with DetectFilter

use of com.blackducksoftware.integration.hub.detect.util.filter.DetectFilter in project hub-detect by blackducksoftware.

the class AllAndNoneExcludedIncludedFilterTest method testOverridableNormalIncludeList.

@Test
public void testOverridableNormalIncludeList() {
    DetectFilter filter = new DetectOverrideableFilter("", "docker,rubygems");
    assertTrue(filter.shouldInclude("docker"));
    assertTrue(filter.shouldInclude("rubygems"));
    assertFalse(filter.shouldInclude("gradle"));
}
Also used : DetectOverrideableFilter(com.blackducksoftware.integration.hub.detect.util.filter.DetectOverrideableFilter) DetectFilter(com.blackducksoftware.integration.hub.detect.util.filter.DetectFilter) Test(org.junit.Test)

Example 7 with DetectFilter

use of com.blackducksoftware.integration.hub.detect.util.filter.DetectFilter in project hub-detect by blackducksoftware.

the class AllAndNoneExcludedIncludedFilterTest method testNonOverridableAllExcludedWithIgnoredIncludes.

@Test
public void testNonOverridableAllExcludedWithIgnoredIncludes() {
    DetectFilter filter = new DetectNameFilter("ALL", "docker,rubygems");
    assertTrue(filter.shouldInclude("docker"));
    assertTrue(filter.shouldInclude("rubygems"));
    assertFalse(filter.shouldInclude("gradle"));
}
Also used : DetectNameFilter(com.blackducksoftware.integration.hub.detect.util.filter.DetectNameFilter) DetectFilter(com.blackducksoftware.integration.hub.detect.util.filter.DetectFilter) Test(org.junit.Test)

Example 8 with DetectFilter

use of com.blackducksoftware.integration.hub.detect.util.filter.DetectFilter in project hub-detect by blackducksoftware.

the class AllAndNoneExcludedIncludedFilterTest method testNonOverridableNormalIncludeList.

@Test
public void testNonOverridableNormalIncludeList() {
    DetectFilter filter = new DetectNameFilter("", "docker,rubygems");
    assertTrue(filter.shouldInclude("docker"));
    assertTrue(filter.shouldInclude("rubygems"));
    assertFalse(filter.shouldInclude("gradle"));
}
Also used : DetectNameFilter(com.blackducksoftware.integration.hub.detect.util.filter.DetectNameFilter) DetectFilter(com.blackducksoftware.integration.hub.detect.util.filter.DetectFilter) Test(org.junit.Test)

Aggregations

DetectFilter (com.blackducksoftware.integration.hub.detect.util.filter.DetectFilter)8 Test (org.junit.Test)8 DetectNameFilter (com.blackducksoftware.integration.hub.detect.util.filter.DetectNameFilter)4 DetectOverrideableFilter (com.blackducksoftware.integration.hub.detect.util.filter.DetectOverrideableFilter)4