use of org.linkki.util.handler.Handler in project linkki by linkki-framework.
the class BindingContextTest method testUpdateUIBindingsAndValidate.
@Test
public void testUpdateUIBindingsAndValidate() {
Handler afterUpdateUi = setUpPmoWithAfterUpdateUiHandler();
setUpBinding1();
binding1 = spy(binding1);
context.add(binding1);
context.updateUI();
verify(binding1).updateFromPmo();
verify(afterUpdateUi).apply();
}
use of org.linkki.util.handler.Handler in project linkki by linkki-framework.
the class BindingContextTest method testUpdateUIBindings.
@Test
public void testUpdateUIBindings() {
Handler afterUpdateUi = setUpPmoWithAfterUpdateUiHandler();
setUpBinding1();
binding1 = spy(binding1);
context.add(binding1);
context.uiUpdated();
verify(binding1).updateFromPmo();
verify(afterUpdateUi, never()).apply();
}
use of org.linkki.util.handler.Handler in project linkki by linkki-framework.
the class ComponentBindingTest method testUpdateFromPmo_updateAspect.
@Test
public void testUpdateFromPmo_updateAspect() {
Handler componentUpdater = mock(Handler.class);
LinkkiAspectDefinition aspectDefinition = mock(LinkkiAspectDefinition.class);
when(aspectDefinition.createUiUpdater(any(), any())).thenReturn(componentUpdater);
ComponentBinding fieldBinding = new ComponentBinding(new LabelComponentWrapper(label, field), propertyDispatcherValue, Handler.NOP_HANDLER, Arrays.asList(aspectDefinition));
fieldBinding.updateFromPmo();
verify(componentUpdater).apply();
}
Aggregations