use of org.junit.platform.engine.Filter in project junit5 by junit-team.
the class JUnitPlatformProvider method getFilters.
private Filter<?>[] getFilters() {
List<Filter<?>> filters = new ArrayList<>();
Optional<List<String>> includes = getGroupsOrTags(getPropertiesList(INCLUDE_GROUPS), getPropertiesList(INCLUDE_TAGS));
includes.map(TagFilter::includeTags).ifPresent(filters::add);
Optional<List<String>> excludes = getGroupsOrTags(getPropertiesList(EXCLUDE_GROUPS), getPropertiesList(EXCLUDE_TAGS));
excludes.map(TagFilter::excludeTags).ifPresent(filters::add);
TestListResolver testListResolver = parameters.getTestRequest().getTestListResolver();
if (!testListResolver.isEmpty()) {
filters.add(new TestMethodFilter(testListResolver));
}
return filters.toArray(new Filter<?>[filters.size()]);
}
Aggregations