aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/test')
-rw-r--r--server/src/test/java/com/vaadin/data/BinderTest.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/server/src/test/java/com/vaadin/data/BinderTest.java b/server/src/test/java/com/vaadin/data/BinderTest.java
index 401cc07017..b3fe5a8194 100644
--- a/server/src/test/java/com/vaadin/data/BinderTest.java
+++ b/server/src/test/java/com/vaadin/data/BinderTest.java
@@ -473,13 +473,13 @@ public class BinderTest extends BinderTestBase<Binder<Person>, Person> {
TextField textField = new TextField();
assertFalse(textField.isRequiredIndicatorVisible());
- BindingBuilder<Person, String> binding = binder.forField(textField);
+ BindingBuilder<Person, String> bindingBuilder = binder.forField(textField);
assertFalse(textField.isRequiredIndicatorVisible());
- binding.asRequired("foobar");
+ bindingBuilder.asRequired("foobar");
assertTrue(textField.isRequiredIndicatorVisible());
- binding.bind(Person::getFirstName, Person::setFirstName);
+ Binding<Person, String> binding = bindingBuilder.bind(Person::getFirstName, Person::setFirstName);
binder.setBean(item);
assertNull(textField.getErrorMessage());
@@ -491,6 +491,9 @@ public class BinderTest extends BinderTestBase<Binder<Person>, Person> {
textField.setValue("value");
assertNull(textField.getErrorMessage());
assertTrue(textField.isRequiredIndicatorVisible());
+
+ binding.setAsRequiredEnabled(false);
+ assertFalse(textField.isRequiredIndicatorVisible());
}
@Test