java.lang.Object
com.iamsoft.util.ui.javafx.test.AbstractJavaFXTest
Extend this class if all tests should be run on the JavaFX UI thread.
If the JavaFX UI thread should be released for a while inside a test, the
testLater
and testOnMainThreadLater
method can be used to do this. Note
that these methods queue the runnables in a single queue and then are served in FIFO
order. After a runnable is queued, all code, which should be executed after the runnable,
also should be queued. All queued runnables are execute one by one with the specified
delay between them. Currently, there are two choices - to execute a runnable on the JavaFX
thread, or on the main thread.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
testLater
(int pRetryCount, long pRetryDelayMillis, BooleanSupplier pSuccess) This method can be used to wait for a condition to becometrue
by specifying a number of retries, before giving up, and a delay in milliseconds between retries.void
Queues the specified runnable to be run on the JavaFX UI thread.void
Queues the specified runnable to be run on the JavaFX UI thread.void
testOnMainThreadLater
(long pDelayMillis, Testable pRunnable) Queues the specified runnable to be run on the main thread, instead of on the JavaFX UI thread.void
testOnMainThreadLater
(Testable pRunnable) Queues the specified runnable to be run on the main thread, instead of on the JavaFX UI thread.
-
Field Details
-
mJfxRule
-
-
Constructor Details
-
AbstractJavaFXTest
public AbstractJavaFXTest()
-
-
Method Details
-
testLater
Queues the specified runnable to be run on the JavaFX UI thread. -
testLater
Queues the specified runnable to be run on the JavaFX UI thread. -
testLater
This method can be used to wait for a condition to becometrue
by specifying a number of retries, before giving up, and a delay in milliseconds between retries. Note that the conditions is first evaluated without delay (after it pops from the queue), and after that the specified amount of retires is performed if needed. -
testOnMainThreadLater
Queues the specified runnable to be run on the main thread, instead of on the JavaFX UI thread. -
testOnMainThreadLater
Queues the specified runnable to be run on the main thread, instead of on the JavaFX UI thread.
-