Java 类org.junit.platform.engine.ConfigurationParameters 实例源码

项目:webtester2-core    文件:TestClassExecutor.java   
public static void execute(Class<?> testClass) throws Exception {
    try {

        JupiterTestEngine engine = new JupiterTestEngine();

        TestClassEngineDiscoveryRequest discoveryRequest = new TestClassEngineDiscoveryRequest(testClass);
        TestDescriptor testDescriptor = engine.discover(discoveryRequest, UniqueId.forEngine("foo-bar"));

        EngineExecutionListener listener = new NoOpEngineExecutionListener();
        ConfigurationParameters parameters = new NoConfigurationParameters();
        engine.execute(new ExecutionRequest(testDescriptor, listener, parameters));

    } catch (UndeclaredThrowableException e) {
        Throwable cause = getFirstNonUndeclaredThrowableCause(e);
        if (cause instanceof Error) {
            throw ( Error ) cause;
        } else if (cause instanceof RuntimeException) {
            throw ( RuntimeException ) cause;
        } else if (cause instanceof Exception) {
            throw ( Exception ) cause;
        } else {
            throw e;
        }
    }
}
项目:webtester2-core    文件:TestClassExecutor.java   
@Override
public ConfigurationParameters getConfigurationParameters() {
    return new NoConfigurationParameters();
}
项目:jovial    文件:ClojureTestEngine.java   
@Override
protected Object getEngine(ConfigurationParameters config) {
    return SimpleClojure.invoke("org.ajoberstar.jovial.engine.clojure-test", "engine", config);
}
项目:junit5-samples    文件:Machine.java   
/**
 * Extract amount of scoops to generate.
 */
int getScoops(EngineDiscoveryRequest discoveryRequest, int defaultScoops) {
    ConfigurationParameters parameters = discoveryRequest.getConfigurationParameters();
    String scoops = parameters.get("scoops").orElse(Integer.toString(defaultScoops));
    return Integer.valueOf(scoops);
}
项目:jovial    文件:BaseClojureEngine.java   
protected abstract Object getEngine(ConfigurationParameters config);