Class JavaFXThreadingRule
- java.lang.Object
-
- ch.sahits.game.openpatrician.testutilities.JavaFXThreadingRule
-
- All Implemented Interfaces:
org.junit.rules.TestRule
public class JavaFXThreadingRule extends java.lang.Object implements org.junit.rules.TestRule
A JUnitRule
for running tests on the JavaFX thread and performing JavaFX initialisation. To include in your test case, add the following code:@Rule public JavaFXThreadingRule jfxRule = new JavaFXThreadingRule();
- Author:
- Andy Till
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
JavaFXThreadingRule.OnJFXThreadStatement
-
Field Summary
Fields Modifier and Type Field Description private static boolean
jfxIsSetup
Flag for setting up the JavaFX, we only need to do this once for all tests.
-
Constructor Summary
Constructors Constructor Description JavaFXThreadingRule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.junit.runners.model.Statement
apply(org.junit.runners.model.Statement statement, org.junit.runner.Description description)
-