use of javafx.event.ActionEvent in project Malai by arnobl.
the class TestSpinnerChanged method testProcessEventGoodState.
@Test
void testProcessEventGoodState() throws CancelFSMException {
interaction.processEvent(new ActionEvent(widget, null));
JfxtestHelper.waitForTimeoutTransitions();
Mockito.verify(handler, Mockito.times(1)).fsmStops();
Mockito.verify(handler, Mockito.times(1)).fsmStarts();
}
use of javafx.event.ActionEvent in project Malai by arnobl.
the class TestSpinnerChanged method testProcessEventReinit.
@Test
void testProcessEventReinit() {
interaction.processEvent(new ActionEvent(widget, null));
JfxtestHelper.waitForTimeoutTransitions();
assertNull(interaction.getWidget());
assertTrue(interaction.getFsm().getCurrentState() instanceof InitState);
}
use of javafx.event.ActionEvent in project Malai by arnobl.
the class TestSpinnerChanged method testProcessEventGoodData.
@Test
void testProcessEventGoodData() {
interaction.getFsm().addHandler(new InteractionHandlerStub() {
@Override
public void fsmStops() {
assertEquals(widget, interaction.getWidget());
}
});
interaction.processEvent(new ActionEvent(widget, null));
}
use of javafx.event.ActionEvent in project Malai by arnobl.
the class TestSpinnerChanged method testNoActionWhenNullRegistered.
@Test
void testNoActionWhenNullRegistered() throws CancelFSMException {
interaction.registerToNodes(null);
widget.fireEvent(new ActionEvent(widget, null));
Mockito.verify(handler, Mockito.never()).fsmStops();
Mockito.verify(handler, Mockito.never()).fsmStarts();
}
use of javafx.event.ActionEvent in project Malai by arnobl.
the class TestSpinnerChanged method testNoActionWhenNotRegistered.
@Test
void testNoActionWhenNotRegistered() throws CancelFSMException {
widget.fireEvent(new ActionEvent(widget, null));
Mockito.verify(handler, Mockito.never()).fsmStops();
Mockito.verify(handler, Mockito.never()).fsmStarts();
}
Aggregations