use of org.junit.platform.engine.discovery.ClassNameFilter in project junit5 by junit-team.
the class DiscoveryRequestCreatorTests method convertsDefaultIncludeClassNamePatternOption.
@Test
void convertsDefaultIncludeClassNamePatternOption() {
options.setScanClasspath(true);
LauncherDiscoveryRequest request = convert();
List<ClassNameFilter> filter = request.getFiltersByType(ClassNameFilter.class);
assertThat(filter).hasSize(1);
assertThat(filter.get(0).toString()).contains(STANDARD_INCLUDE_PATTERN);
}
use of org.junit.platform.engine.discovery.ClassNameFilter in project junit5 by junit-team.
the class DiscoveryRequestCreatorTests method convertsExcludeClassNamePatternOption.
@Test
void convertsExcludeClassNamePatternOption() {
options.setScanClasspath(true);
options.setExcludedClassNamePatterns(asList("Foo.*Bar", "Bar.*Foo"));
LauncherDiscoveryRequest request = convert();
List<ClassNameFilter> filter = request.getFiltersByType(ClassNameFilter.class);
assertThat(filter).hasSize(2);
assertThat(filter.get(1).toString()).contains("Foo.*Bar");
assertThat(filter.get(1).toString()).contains("Bar.*Foo");
}
use of org.junit.platform.engine.discovery.ClassNameFilter in project junit5 by junit-team.
the class DiscoveryRequestCreatorTests method convertsExplicitIncludeClassNamePatternOption.
@Test
void convertsExplicitIncludeClassNamePatternOption() {
options.setScanClasspath(true);
options.setIncludedClassNamePatterns(asList("Foo.*Bar", "Bar.*Foo"));
LauncherDiscoveryRequest request = convert();
List<ClassNameFilter> filter = request.getFiltersByType(ClassNameFilter.class);
assertThat(filter).hasSize(1);
assertThat(filter.get(0).toString()).contains("Foo.*Bar");
assertThat(filter.get(0).toString()).contains("Bar.*Foo");
}
Aggregations