use of org.malai.binding.WidgetBindingImpl in project Malai by arnobl.
the class TestInteractor method testInteractionStartsOkCauseOfTheNonPublicAction.
@Test
void testInteractionStartsOkCauseOfTheNonPublicAction() throws CancelFSMException {
final boolean[] ok = { false };
ErrorCatcher.INSTANCE.setNotifier(exception -> ok[0] = true);
StubInstrument ins = new StubInstrument();
WidgetBinding interactor2 = new WidgetBindingImpl<CommandImplStub2, InteractionMock, StubInstrument>(ins, false, CommandImplStub2.class, new InteractionMock()) {
@Override
public void first() {
}
@Override
public boolean when() {
return true;
}
@Override
protected void executeCmdAsync(final Command cmd) {
}
};
ins.setActivated(true);
interactor2.fsmStarts();
assertTrue(ok[0]);
assertNull(interactor.getCommand());
}
use of org.malai.binding.WidgetBindingImpl in project Malai by arnobl.
the class TestInteractor method testInteractionStartsOkCauseOfTheNonPublicAction2.
@Test
void testInteractionStartsOkCauseOfTheNonPublicAction2() throws CancelFSMException {
final boolean[] ok = { false };
ErrorCatcher.INSTANCE.setNotifier(exception -> ok[0] = true);
StubInstrument ins = new StubInstrument();
WidgetBinding interactor2 = new WidgetBindingImpl<CommandImplStub3, InteractionMock, StubInstrument>(ins, false, CommandImplStub3.class, new InteractionMock()) {
@Override
public void first() {
}
@Override
public boolean when() {
return true;
}
@Override
protected void executeCmdAsync(final Command cmd) {
}
};
ins.setActivated(true);
interactor2.fsmStarts();
assertTrue(ok[0]);
assertNull(interactor2.getCommand());
}
Aggregations