use of org.junit.platform.engine.discovery.ModuleSelector 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