use of org.linkki.core.binding.ElementBinding in project linkki by linkki-framework.
the class BindAnnotationDescriptorTest method testCreateBinding_CreatesFieldBindingForField.
@Test
public void testCreateBinding_CreatesFieldBindingForField() {
BindAnnotationDescriptor descriptor = new BindAnnotationDescriptor(mock(Bind.class), new ArrayList<>());
PropertyDispatcher dispatcher = mock(PropertyDispatcher.class);
ElementBinding binding = descriptor.createBinding(dispatcher, Handler.NOP_HANDLER, new LabelComponentWrapper(new TextField()));
assertThat(binding, is(instanceOf(ComponentBinding.class)));
}
use of org.linkki.core.binding.ElementBinding in project linkki by linkki-framework.
the class BindAnnotationDescriptorTest method testCreateBinding_CreatesLabelBindingForLabel.
@Test
public void testCreateBinding_CreatesLabelBindingForLabel() {
BindAnnotationDescriptor descriptor = new BindAnnotationDescriptor(mock(Bind.class), new ArrayList<>());
PropertyDispatcher dispatcher = mock(PropertyDispatcher.class);
ElementBinding binding = descriptor.createBinding(dispatcher, Handler.NOP_HANDLER, new LabelComponentWrapper(new Label()));
assertThat(binding, is(instanceOf(ElementBinding.class)));
}
use of org.linkki.core.binding.ElementBinding in project linkki by linkki-framework.
the class BindAnnotationDescriptorTest method testCreateBinding_CreatesButtonBindingForButton.
@Test
public void testCreateBinding_CreatesButtonBindingForButton() {
BindAnnotationDescriptor descriptor = new BindAnnotationDescriptor(mock(Bind.class), new ArrayList<>());
PropertyDispatcher dispatcher = mock(PropertyDispatcher.class);
ElementBinding binding = descriptor.createBinding(dispatcher, Handler.NOP_HANDLER, new LabelComponentWrapper(new Button()));
assertThat(binding, is(instanceOf(ElementBinding.class)));
}
Aggregations