Search in sources :

Example 1 with Resolution

use of org.junit.platform.engine.support.discovery.SelectorResolver.Resolution in project junit5 by junit-team.

the class EngineDiscoveryRequestResolution method resolveCompletely.

private void resolveCompletely(DiscoverySelector selector) {
    EngineDiscoveryListener discoveryListener = request.getDiscoveryListener();
    UniqueId engineId = engineDescriptor.getUniqueId();
    try {
        Optional<Resolution> result = resolve(selector);
        if (result.isPresent()) {
            discoveryListener.selectorProcessed(engineId, selector, resolved());
            enqueueAdditionalSelectors(result.get());
        } else {
            discoveryListener.selectorProcessed(engineId, selector, unresolved());
        }
    } catch (Throwable t) {
        UnrecoverableExceptions.rethrowIfUnrecoverable(t);
        discoveryListener.selectorProcessed(engineId, selector, failed(t));
    }
}
Also used : UniqueId(org.junit.platform.engine.UniqueId) EngineDiscoveryListener(org.junit.platform.engine.EngineDiscoveryListener) Resolution(org.junit.platform.engine.support.discovery.SelectorResolver.Resolution)

Aggregations

EngineDiscoveryListener (org.junit.platform.engine.EngineDiscoveryListener)1 UniqueId (org.junit.platform.engine.UniqueId)1 Resolution (org.junit.platform.engine.support.discovery.SelectorResolver.Resolution)1