Search in sources :

Example 1 with DetectFilter

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

the class AllAndNoneExcludedIncludedFilterTest method testOverridableNormalExcludeList.

// Overridable
@Test
public void testOverridableNormalExcludeList() {
    DetectFilter filter = new DetectOverrideableFilter("docker,rubygems", "");
    assertFalse(filter.shouldInclude("docker"));
    assertFalse(filter.shouldInclude("rubygems"));
    assertTrue(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 2 with DetectFilter

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

the class AllAndNoneExcludedIncludedFilterTest method testOverridableAllExcluded.

@Test
public void testOverridableAllExcluded() {
    DetectFilter filter = new DetectOverrideableFilter("ALL", "");
    assertFalse(filter.shouldInclude("docker"));
    assertFalse(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 3 with DetectFilter

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

the class AllAndNoneExcludedIncludedFilterTest method testNonOverridableNormalExcludeList.

// NonOverridable
@Test
public void testNonOverridableNormalExcludeList() {
    DetectFilter filter = new DetectNameFilter("docker,rubygems", "");
    assertFalse(filter.shouldInclude("docker"));
    assertFalse(filter.shouldInclude("rubygems"));
    assertTrue(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 4 with DetectFilter

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

the class AllAndNoneExcludedIncludedFilterTest method testOverridableAllExcludedWithIgnoredIncludes.

@Test
public void testOverridableAllExcludedWithIgnoredIncludes() {
    DetectFilter filter = new DetectOverrideableFilter("ALL", "docker,rubygems");
    assertFalse(filter.shouldInclude("docker"));
    assertFalse(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 5 with DetectFilter

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

the class AllAndNoneExcludedIncludedFilterTest method testNonOverridableAllExcluded.

@Test
public void testNonOverridableAllExcluded() {
    DetectFilter filter = new DetectNameFilter("ALL", "");
    assertTrue(filter.shouldInclude("docker"));
    assertTrue(filter.shouldInclude("rubygems"));
    assertTrue(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