Class JavaFXThreadingRule

java.lang.Object
com.iamsoft.util.ui.javafx.test.JavaFXThreadingRule
All Implemented Interfaces:
org.junit.rules.MethodRule

public class JavaFXThreadingRule extends Object implements org.junit.rules.MethodRule
A JUnit Rule for running tests on the JavaFX thread and performing JavaFX initialization. To include in your test case, add the following code:
 @Rule
 public JavaFXThreadingRule jfxRule = new JavaFXThreadingRule();
 
See Also:
  • Constructor Details

    • JavaFXThreadingRule

      public JavaFXThreadingRule()
  • Method Details

    • apply

      public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement pStatement, org.junit.runners.model.FrameworkMethod pMethod, Object pTarget)
      Specified by:
      apply in interface org.junit.rules.MethodRule
    • 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)