use of org.junit.platform.engine.discovery.FilePosition in project cucumber-jvm by cucumber.
the class DiscoverySelectorResolverTest method resolveRequestWithClasspathResourceSelectorAndFilePosition.
@Test
void resolveRequestWithClasspathResourceSelectorAndFilePosition() {
String feature = "io/cucumber/junit/platform/engine/rule.feature";
FilePosition line = FilePosition.from(5);
DiscoverySelector resource = selectClasspathResource(feature, line);
EngineDiscoveryRequest discoveryRequest = new SelectorRequest(resource);
resolver.resolveSelectors(discoveryRequest, testDescriptor);
assertEquals(1L, testDescriptor.getDescendants().stream().filter(TestDescriptor::isTest).count());
}
use of org.junit.platform.engine.discovery.FilePosition in project cucumber-jvm by cucumber.
the class DiscoverySelectorResolverTest method resolveRequestWithFileSelectorAndPosition.
@Test
void resolveRequestWithFileSelectorAndPosition() {
String feature = "src/test/resources/io/cucumber/junit/platform/engine/rule.feature";
FilePosition line = FilePosition.from(5);
DiscoverySelector resource = selectFile(feature, line);
EngineDiscoveryRequest discoveryRequest = new SelectorRequest(resource);
resolver.resolveSelectors(discoveryRequest, testDescriptor);
assertEquals(1L, testDescriptor.getDescendants().stream().filter(TestDescriptor::isTest).count());
}
use of org.junit.platform.engine.discovery.FilePosition in project cucumber-jvm by cucumber.
the class DiscoverySelectorResolverTest method resolveRequestWithClasspathResourceSelectorAndFilePositionOfContainer.
@Test
void resolveRequestWithClasspathResourceSelectorAndFilePositionOfContainer() {
String feature = "io/cucumber/junit/platform/engine/rule.feature";
FilePosition line = FilePosition.from(3);
DiscoverySelector resource = selectClasspathResource(feature, line);
EngineDiscoveryRequest discoveryRequest = new SelectorRequest(resource);
resolver.resolveSelectors(discoveryRequest, testDescriptor);
assertEquals(2L, testDescriptor.getDescendants().stream().filter(TestDescriptor::isTest).count());
}
use of org.junit.platform.engine.discovery.FilePosition in project cucumber-jvm by cucumber.
the class DiscoverySelectorResolverTest method resolveRequestWithFileSelectorAndPositionOfContainer.
@Test
void resolveRequestWithFileSelectorAndPositionOfContainer() {
String feature = "src/test/resources/io/cucumber/junit/platform/engine/rule.feature";
FilePosition line = FilePosition.from(3);
DiscoverySelector resource = selectFile(feature, line);
EngineDiscoveryRequest discoveryRequest = new SelectorRequest(resource);
resolver.resolveSelectors(discoveryRequest, testDescriptor);
assertEquals(2L, testDescriptor.getDescendants().stream().filter(TestDescriptor::isTest).count());
}
Aggregations