de.dagere.kopeme.runnables.SimpleThrowingRunnable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kopeme-junit5 Show documentation
Show all versions of kopeme-junit5 Show documentation
KoPeMe-JUnit 5 integration module
package de.dagere.kopeme.runnables;
import org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor;
import org.junit.jupiter.engine.execution.JupiterEngineExecutionContext;
public class SimpleThrowingRunnable implements KoPeMeThrowingRunnable {
private final TestMethodTestDescriptor descriptor;
private final JupiterEngineExecutionContext clazzContext;
public SimpleThrowingRunnable(TestMethodTestDescriptor descriptor, JupiterEngineExecutionContext clazzContext) {
this.descriptor = descriptor;
this.clazzContext = clazzContext;
}
@Override
public void run() throws Throwable {
descriptor.execute(clazzContext, null);
if (clazzContext.getThrowableCollector().getThrowable() != null) {
throw clazzContext.getThrowableCollector().getThrowable();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy