Class 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 Detail

      • JavaFXThreadingInterceptor

        public JavaFXThreadingInterceptor()
    • Method Detail

      • 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 interface org.junit.jupiter.api.extension.InvocationInterceptor
        Throws:
        Throwable
      • testLater

        public void testLater​(long pMillis,
                              Testable pRunnable)
      • testLater

        public void testLater​(int pRetryCount,
                              long pRetryDelayMillis,
                              BooleanSupplier pSuccess)
      • testOnMainThreadLater

        public void testOnMainThreadLater​(Testable pRunnable)
      • testOnMainThreadLater

        public void testOnMainThreadLater​(long pMillis,
                                          Testable pRunnable)