summaryrefslogtreecommitdiffstats
path: root/server/tests/src/com/vaadin
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-12-17 19:31:46 +0000
committerArtur Signell <artur@vaadin.com>2012-12-17 21:34:04 +0200
commit18da456c1b398515456ed2224278b95b45538c22 (patch)
treed25b563dab029a28e89279ea24a1be2277f3950f /server/tests/src/com/vaadin
parentfffd25fc57c862afdac2f4cfc36695c0bd35ec96 (diff)
downloadvaadin-framework-18da456c1b398515456ed2224278b95b45538c22.tar.gz
vaadin-framework-18da456c1b398515456ed2224278b95b45538c22.zip
Revert "Case-insensitive FieldGroup binding #10426"
This reverts commit fffd25fc57c862afdac2f4cfc36695c0bd35ec96 Breaks binding using BeanFieldGroup before an item data source has been set. Change-Id: Id05372eef2078efea9e92a69a1af942511ff32a9
Diffstat (limited to 'server/tests/src/com/vaadin')
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/fieldgroup/CaseInsensitiveBinding.java84
1 files changed, 0 insertions, 84 deletions
diff --git a/server/tests/src/com/vaadin/tests/server/component/fieldgroup/CaseInsensitiveBinding.java b/server/tests/src/com/vaadin/tests/server/component/fieldgroup/CaseInsensitiveBinding.java
deleted file mode 100644
index 9b768ef77f..0000000000
--- a/server/tests/src/com/vaadin/tests/server/component/fieldgroup/CaseInsensitiveBinding.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package com.vaadin.tests.server.component.fieldgroup;
-
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-import com.vaadin.data.fieldgroup.FieldGroup;
-import com.vaadin.data.util.ObjectProperty;
-import com.vaadin.data.util.PropertysetItem;
-import com.vaadin.ui.FormLayout;
-import com.vaadin.ui.TextField;
-
-public class CaseInsensitiveBinding {
-
- @Test
- public void caseInsensitivityAndUnderscoreRemoval() {
- PropertysetItem item = new PropertysetItem();
- item.addItemProperty("LastName", new ObjectProperty<String>("Sparrow"));
-
- class MyForm extends FormLayout {
- TextField lastName = new TextField("Last name");
-
- public MyForm() {
-
- // Should bind to the LastName property
- addComponent(lastName);
- }
- }
-
- MyForm form = new MyForm();
-
- FieldGroup binder = new FieldGroup(item);
- binder.bindMemberFields(form);
-
- assertTrue("Sparrow".equals(form.lastName.getValue()));
- }
-
- @Test
- public void UnderscoreRemoval() {
- PropertysetItem item = new PropertysetItem();
- item.addItemProperty("first_name", new ObjectProperty<String>("Jack"));
-
- class MyForm extends FormLayout {
- TextField firstName = new TextField("First name");
-
- public MyForm() {
- // Should bind to the first_name property
- addComponent(firstName);
- }
- }
-
- MyForm form = new MyForm();
-
- FieldGroup binder = new FieldGroup(item);
- binder.bindMemberFields(form);
-
- assertTrue("Jack".equals(form.firstName.getValue()));
- }
-
- @Test
- public void perfectMatchPriority() {
- PropertysetItem item = new PropertysetItem();
- item.addItemProperty("first_name", new ObjectProperty<String>(
- "Not this"));
- item.addItemProperty("firstName", new ObjectProperty<String>("This"));
-
- class MyForm extends FormLayout {
- TextField firstName = new TextField("First name");
-
- public MyForm() {
- // should bind to the firstName property, not first_name property
- addComponent(firstName);
- }
- }
-
- MyForm form = new MyForm();
-
- FieldGroup binder = new FieldGroup(item);
- binder.bindMemberFields(form);
-
- assertTrue("This".equals(form.firstName.getValue()));
- }
-
-}