java.lang.Object
com.iamsoft.util.ui.javafx.test.JavaFXThreadingInterceptor
- All Implemented Interfaces:
org.junit.jupiter.api.extension.Extension
,org.junit.jupiter.api.extension.InvocationInterceptor
public class JavaFXThreadingInterceptor
extends Object
implements org.junit.jupiter.api.extension.InvocationInterceptor
A JUnit 5
InvocationInterceptor
for running tests on the JavaFX thread.
To include in your test case, add the following code:
@@RegisterExtension final JavaFXThreadingInterceptor jfxInterceptor = new JavaFXThreadingInterceptor();
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.junit.jupiter.api.extension.InvocationInterceptor
org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<T extends Object>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
interceptTestMethod
(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<Void> pInvocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<Method> pInvocationContext, org.junit.jupiter.api.extension.ExtensionContext pExtensionContext) void
testLater
(int pRetryCount, long pRetryDelayMillis, BooleanSupplier pSuccess) void
void
testOnMainThreadLater
(long pMillis, Testable pRunnable) void
testOnMainThreadLater
(Testable pRunnable) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.junit.jupiter.api.extension.InvocationInterceptor
interceptAfterAllMethod, interceptAfterEachMethod, interceptBeforeAllMethod, interceptBeforeEachMethod, interceptDynamicTest, interceptDynamicTest, interceptTestClassConstructor, interceptTestFactoryMethod, interceptTestTemplateMethod
-
Constructor Details
-
JavaFXThreadingInterceptor
public JavaFXThreadingInterceptor()
-
-
Method Details
-
interceptTestMethod
public void interceptTestMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<Void> pInvocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<Method> pInvocationContext, org.junit.jupiter.api.extension.ExtensionContext pExtensionContext) throws Throwable - Specified by:
interceptTestMethod
in interfaceorg.junit.jupiter.api.extension.InvocationInterceptor
- Throws:
Throwable
-
testLater
-
testLater
-
testOnMainThreadLater
-
testOnMainThreadLater
-