use of org.junit.platform.engine.discovery.DiscoverySelectors in project cucumber-jvm by cucumber.
the class DiscoverySelectorResolverTest method resolveRequestWithMultipleUniqueIdSelector.
@Test
void resolveRequestWithMultipleUniqueIdSelector() {
Set<UniqueId> selectors = new HashSet<>();
DiscoverySelector resource = selectDirectory("src/test/resources/io/cucumber/junit/platform/engine/feature-with-outline.feature");
selectSomePickle(resource).ifPresent(selectors::add);
DiscoverySelector resource2 = selectDirectory("src/test/resources/io/cucumber/junit/platform/engine/single.feature");
selectSomePickle(resource2).ifPresent(selectors::add);
EngineDiscoveryRequest discoveryRequest = new SelectorRequest(selectors.stream().map(DiscoverySelectors::selectUniqueId).collect(Collectors.toList()));
resolver.resolveSelectors(discoveryRequest, testDescriptor);
assertEquals(selectors, testDescriptor.getDescendants().stream().filter(PickleDescriptor.class::isInstance).map(TestDescriptor::getUniqueId).collect(toSet()));
}
Aggregations