io.vertx.ext.unit.impl.ExecutionContext Maven / Gradle / Ivy
package io.vertx.ext.unit.impl;
import io.vertx.core.Context;
/**
* The test suite global context.
*
* @author Julien Viet
*/
public class ExecutionContext {
private final Context context;
public ExecutionContext(Context context) {
this.context = context;
}
public void run(Task task, T value) {
if (context != null) {
context.runOnContext(v -> task.execute(value, this));
} else {
task.execute(value, this);
}
}
public void run(Task> task) {
run(task, null);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy