use of org.linkki.util.handler.Handler in project linkki by linkki-framework.
the class BindingContextTest method setUpPmoWithAfterUpdateUiHandler.
private Handler setUpPmoWithAfterUpdateUiHandler() {
Handler afterUpdateUi = mock(Handler.class);
context = TestBindingContext.create(afterUpdateUi);
pmo.setModelObject(modelObject);
return afterUpdateUi;
}
use of org.linkki.util.handler.Handler in project linkki by linkki-framework.
the class BindingContextTest method testUpdateUIBindings_noBindingInContext.
@Test
public void testUpdateUIBindings_noBindingInContext() {
Handler afterUpdateUi = setUpPmoWithAfterUpdateUiHandler();
setUpBinding1();
binding1 = spy(binding1);
context.uiUpdated();
verify(binding1, never()).updateFromPmo();
verify(binding1, never()).displayMessages(any(MessageList.class));
verify(afterUpdateUi, never()).apply();
}
use of org.linkki.util.handler.Handler in project linkki by linkki-framework.
the class BindingContextTest method testUpdateUIBindingsAndValidate_noBindingInContext.
@Test
public void testUpdateUIBindingsAndValidate_noBindingInContext() {
Handler afterUpdateUi = setUpPmoWithAfterUpdateUiHandler();
setUpBinding1();
binding1 = spy(binding1);
context.updateUI();
verify(afterUpdateUi).apply();
}
use of org.linkki.util.handler.Handler in project linkki by linkki-framework.
the class HandlerTest method testAndThen.
@Test
public void testAndThen() {
TestOkHandler h1 = new TestOkHandler();
TestOkHandler h2 = new TestOkHandler();
Handler composed = h1.andThen(h2);
composed.apply();
assertThat(handlerStack.size(), is(2));
assertThat(handlerStack.pop(), is(h2));
assertThat(handlerStack.pop(), is(h1));
}
use of org.linkki.util.handler.Handler in project linkki by linkki-framework.
the class ConfirmationDialogTest method testCancelCallsOk.
@Test
public void testCancelCallsOk() {
Handler handler = mock(Handler.class);
ConfirmationDialog dialog = new ConfirmationDialog("", new Label(), handler);
dialog.cancel();
verify(handler).apply();
}
Aggregations