Class FxThreadForAllMonocleExtension
- java.lang.Object
-
- org.testfx.api.FxRobot
-
- com.github.actionfx.testing.junit5.AbstractHeadlessMonocleExtension
-
- com.github.actionfx.testing.junit5.FxThreadForAllMonocleExtension
-
- All Implemented Interfaces:
org.junit.jupiter.api.extension.AfterAllCallback,org.junit.jupiter.api.extension.AfterEachCallback,org.junit.jupiter.api.extension.BeforeAllCallback,org.junit.jupiter.api.extension.Extension,org.junit.jupiter.api.extension.InvocationInterceptor,org.junit.jupiter.api.extension.ParameterResolver,org.junit.jupiter.api.extension.TestInstanceFactory,org.junit.jupiter.api.extension.TestInstancePostProcessor,org.testfx.api.FxRobotInterface
public class FxThreadForAllMonocleExtension extends AbstractHeadlessMonocleExtension implements org.junit.jupiter.api.extension.AfterAllCallback
Extension to TestFX'sApplicationExtensionthat starts one JavaFX thread for ALL test methods. This makes the JavaFX thread also available outside of the test methods itself, which might me required by the test fixture. For example, when testing JavaFX applications that also use a Spring container, Spring might want to use the JavaFX application to instantiate beans inside the JavaFX thread.- Author:
- MartinKoster
-
-
Constructor Summary
Constructors Constructor Description FxThreadForAllMonocleExtension()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterAll(org.junit.jupiter.api.extension.ExtensionContext context)voidpostProcessTestInstance(java.lang.Object testInstance, org.junit.jupiter.api.extension.ExtensionContext context)-
Methods inherited from class com.github.actionfx.testing.junit5.AbstractHeadlessMonocleExtension
afterEach, beforeAll, createTestInstance, interceptTestMethod, resolveParameter, startJavaFxApplication, stopJavaFxApplication, supportsParameter
-
Methods inherited from class org.testfx.api.FxRobot
bounds, bounds, bounds, bounds, bounds, bounds, bounds, bounds, bounds, capture, capture, capture, capture, capture, capture, clickOn, clickOn, clickOn, clickOn, clickOn, clickOn, clickOn, clickOn, clickOn, clickOn, clickOn, closeCurrentWindow, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, drag, drag, drag, drag, drag, drag, drag, drag, drag, drag, drag, drop, dropBy, dropTo, dropTo, dropTo, dropTo, dropTo, dropTo, dropTo, dropTo, dropTo, dropTo, eraseText, from, from, from, fromAll, interact, interact, interactNoWait, interactNoWait, interrupt, interrupt, listTargetWindows, listWindows, lookup, lookup, lookup, moveBy, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, offset, offset, offset, offset, offset, offset, offset, offset, offset, point, point, point, point, point, point, point, point, point, press, press, push, push, release, release, rightClickOn, rightClickOn, rightClickOn, rightClickOn, rightClickOn, rightClickOn, rightClickOn, rightClickOn, rightClickOn, rightClickOn, rightClickOn, robotContext, rootNode, rootNode, rootNode, scroll, scroll, scroll, scroll, scroll, sleep, sleep, targetPos, targetWindow, targetWindow, targetWindow, targetWindow, targetWindow, targetWindow, targetWindow, targetWindow, type, type, window, window, window, window, window, window, write, write, write
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.testfx.api.FxRobotInterface
clickOn, clickOn, clickOn, clickOn, clickOn, clickOn, clickOn, clickOn, clickOn, clickOn, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, doubleClickOn, moveBy, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, offset, offset, offset, offset, offset, offset, offset, offset, offset, rightClickOn, rightClickOn, rightClickOn, rightClickOn, rightClickOn, rightClickOn, rightClickOn, rightClickOn, rightClickOn, rightClickOn
-
-
-
-
Method Detail
-
postProcessTestInstance
public void postProcessTestInstance(java.lang.Object testInstance, org.junit.jupiter.api.extension.ExtensionContext context) throws java.lang.Exception- Specified by:
postProcessTestInstancein interfaceorg.junit.jupiter.api.extension.TestInstancePostProcessor- Overrides:
postProcessTestInstancein classAbstractHeadlessMonocleExtension- Throws:
java.lang.Exception
-
afterAll
public void afterAll(org.junit.jupiter.api.extension.ExtensionContext context) throws java.lang.Exception- Specified by:
afterAllin interfaceorg.junit.jupiter.api.extension.AfterAllCallback- Throws:
java.lang.Exception
-
-