Class JavaFXThreadingInterceptor

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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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)
     
    void
    testLater(int pRetryCount, long pRetryDelayMillis, BooleanSupplier pSuccess)
     
    void
    testLater(long pMillis, Testable pRunnable)
     
    void
    testOnMainThreadLater(long pMillis, Testable pRunnable)
     
    void
     

    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 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)