diff options
author | John Ahlroos <john@vaadin.com> | 2013-03-01 15:00:47 +0200 |
---|---|---|
committer | John Ahlroos <john@vaadin.com> | 2013-03-01 15:03:05 +0200 |
commit | c965ff2475f4047ae5efa2b2917089f8b97e95d9 (patch) | |
tree | 76e29313c468e791dba2dbae30aefca105b48d81 /server/tests | |
parent | eb65236d0eee3cbeebe5a2d5fa5a2f3744ebaeff (diff) | |
parent | 7f9e51e0e31c5c0a699c7ca486aaf993d5aec347 (diff) | |
download | vaadin-framework-c965ff2475f4047ae5efa2b2917089f8b97e95d9.tar.gz vaadin-framework-c965ff2475f4047ae5efa2b2917089f8b97e95d9.zip |
Merge remote-tracking branch 'origin/7.0'
Change-Id: Ifdc095169c31731cb013727f14d92839ecc775db
Diffstat (limited to 'server/tests')
-rw-r--r-- | server/tests/src/com/vaadin/tests/server/TestClassesSerializable.java | 5 | ||||
-rw-r--r-- | server/tests/src/com/vaadin/tests/server/component/fieldgroup/BeanFieldGroupTest.java | 41 |
2 files changed, 46 insertions, 0 deletions
diff --git a/server/tests/src/com/vaadin/tests/server/TestClassesSerializable.java b/server/tests/src/com/vaadin/tests/server/TestClassesSerializable.java index 0d3dea28ac..3172b759a1 100644 --- a/server/tests/src/com/vaadin/tests/server/TestClassesSerializable.java +++ b/server/tests/src/com/vaadin/tests/server/TestClassesSerializable.java @@ -48,6 +48,11 @@ public class TestClassesSerializable extends TestCase { "com\\.vaadin\\.server\\.AbstractCommunicationManager.*", // "com\\.vaadin\\.server\\.CommunicationManager.*", // "com\\.vaadin\\.server\\.PortletCommunicationManager.*", // + "com\\.vaadin\\.buildhelpers.*", // + "com\\.vaadin\\.util\\.ReflectTools.*", // + "com\\.vaadin\\.data\\.util\\.ReflectTools.*", // + "com\\.vaadin\\.sass.*", // + "com\\.vaadin\\.util\\.CurrentInstance\\$1", // }; /** diff --git a/server/tests/src/com/vaadin/tests/server/component/fieldgroup/BeanFieldGroupTest.java b/server/tests/src/com/vaadin/tests/server/component/fieldgroup/BeanFieldGroupTest.java new file mode 100644 index 0000000000..68c1133dc0 --- /dev/null +++ b/server/tests/src/com/vaadin/tests/server/component/fieldgroup/BeanFieldGroupTest.java @@ -0,0 +1,41 @@ +package com.vaadin.tests.server.component.fieldgroup; + +import static org.junit.Assert.assertEquals; + +import org.junit.Test; +import com.vaadin.data.fieldgroup.BeanFieldGroup; + +public class BeanFieldGroupTest { + + public static class MyBean { + + private MyNestedBean nestedBean = new MyNestedBean(); + + public MyNestedBean getNestedBean() { + return nestedBean; + } + } + + public static class MyNestedBean { + + private String hello = "Hello world"; + + public String getHello() { + return hello; + } + } + + @Test + public void buildAndBindNestedProperty() { + + MyBean bean = new MyBean(); + + BeanFieldGroup<MyBean> bfg = new BeanFieldGroup<MyBean>(MyBean.class); + bfg.setItemDataSource(bean); + + com.vaadin.ui.Field<?> helloField = bfg.buildAndBind("Hello string", + "nestedBean.hello"); + assertEquals(bean.nestedBean.hello, helloField.getValue().toString()); + } + +} |