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 TypeMethodDescriptionvoidinterceptTestMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<Void> pInvocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<Method> pInvocationContext, org.junit.jupiter.api.extension.ExtensionContext pExtensionContext) voidtestLater(int pRetryCount, long pRetryDelayMillis, BooleanSupplier pSuccess) voidvoidtestOnMainThreadLater(long pMillis, Testable pRunnable) voidtestOnMainThreadLater(Testable pRunnable) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
interceptTestMethodin interfaceorg.junit.jupiter.api.extension.InvocationInterceptor- Throws:
Throwable
-
testLater
-
testLater
-
testOnMainThreadLater
-
testOnMainThreadLater
-