Пример #1
0
 protected DependencyTree assertExcludeFilter(
     DependencyTreeResult result,
     String groupId,
     String artifactId,
     boolean expected,
     String filterText)
     throws MalformedURLException, ArtifactResolutionException {
   DependencyTree tree = assertFindDependencyTree(result, groupId, artifactId);
   Filter<DependencyTree> filter =
       DependencyTreeFilters.parseExcludeFilter(filterText, Filters.falseFilter());
   boolean actual = filter.matches(tree);
   assertEquals("Filter failed for " + filterText, expected, actual);
   // System.out.println("Testing " + tree + " for filter: " + filterText + " = " + actual);
   return tree;
 }
Пример #2
0
 public Filter<String> getFilter() {
   if (filter == null) {
     filter = Filters.createStringFilter(Strings.defaultIfEmpty(pattern, "*"));
   }
   return filter;
 }