My first idea: ``` class FooViewTest { @Rule v...
# tornadofx
h
My first idea:
Copy code
class FooViewTest {
    @Rule val robot = FxLifecycle.robot()
    @Rule val viewLifecycle = FxLifecycle.before().view(FooView::class)
    @Rule val stageLifecycle = FxLifecycle.after().clearAllStages()

    @Test fun click_on_button() {
        robot.clickOn(".countup")
        expect(".counter").has.text("1")
    }
}
Looks a bit boilerplatey (not much TornadoFX-like). I really want to prefer `@Rule`s over test class inheritance. Note that `@Rule`s for JUnit4 don't work with their equivalents in JUnit5 (at least that's what I understood when I asked someone from the JUnit5 team in Vienna).