use of org.junit.jupiter.engine.discovery.DiscoverySelectorResolver in project junit5 by junit-team.
the class JupiterTestEngine method discover.
@Override
public TestDescriptor discover(EngineDiscoveryRequest discoveryRequest, UniqueId uniqueId) {
JupiterEngineDescriptor engineDescriptor = new JupiterEngineDescriptor(uniqueId);
new DiscoverySelectorResolver().resolveSelectors(discoveryRequest, engineDescriptor);
return engineDescriptor;
}
use of org.junit.jupiter.engine.discovery.DiscoverySelectorResolver in project junit5 by junit-team.
the class JupiterIntegrationTests method resolve.
@Test
void resolve() {
assumeTrue(getClass().getModule().isNamed(), "not running on the module-path");
ModuleSelector selector = DiscoverySelectors.selectModule(getClass().getModule().getName());
assertEquals(getClass().getModule().getName(), selector.getModuleName());
EngineDescriptor engine = new JupiterEngineDescriptor(UniqueId.forEngine(JupiterTestEngine.ENGINE_ID));
DiscoverySelectorResolver resolver = new DiscoverySelectorResolver();
resolver.resolveSelectors(request().selectors(selector).build(), engine);
// JupiterIntegrationTests.class
assertEquals(1, engine.getChildren().size());
// 5 test methods
assertEquals(5, getOnlyElement(engine.getChildren()).getChildren().size());
}
Aggregations