use of org.junit.platform.engine.discovery.DirectorySelector in project junit5 by junit-team.
the class DiscoveryRequestCreatorTests method convertsDirectorySelectors.
@Test
void convertsDirectorySelectors() {
options.setSelectedDirectories(asList("foo/bar", "bar/qux"));
LauncherDiscoveryRequest request = convert();
List<DirectorySelector> directorySelectors = request.getSelectorsByType(DirectorySelector.class);
assertThat(directorySelectors).extracting(DirectorySelector::getRawPath).containsExactly("foo/bar", "bar/qux");
}
use of org.junit.platform.engine.discovery.DirectorySelector in project junit5 by junit-team.
the class SuiteLauncherDiscoveryRequestBuilderTests method selectDirectories.
@Test
void selectDirectories() {
@SelectDirectories("path/to/root")
class Suite {
}
LauncherDiscoveryRequest request = builder.suite(Suite.class).build();
List<DirectorySelector> selectors = request.getSelectorsByType(DirectorySelector.class);
assertEquals(Paths.get("path/to/root"), exactlyOne(selectors).getPath());
}
Aggregations