diff options
author | Jonatan Kronqvist <jonatan.kronqvist@itmill.com> | 2011-09-29 12:44:21 +0000 |
---|---|---|
committer | Jonatan Kronqvist <jonatan.kronqvist@itmill.com> | 2011-09-29 12:44:21 +0000 |
commit | c4b62e478ac9ab8f66c3ca4289619b0f9c8ee958 (patch) | |
tree | 3b4ca56faecf6f65e8cd308d8f0cdcdd822c2886 /tests/server-side/com/vaadin/data/util/AbstractBeanContainerTest.java | |
parent | cceb9d3f2bf475037e6a40b591968ef80c4878b8 (diff) | |
download | vaadin-framework-c4b62e478ac9ab8f66c3ca4289619b0f9c8ee958.tar.gz vaadin-framework-c4b62e478ac9ab8f66c3ca4289619b0f9c8ee958.zip |
Restructure test source directories and packages #7385
svn changeset:21440/svn branch:6.7
Diffstat (limited to 'tests/server-side/com/vaadin/data/util/AbstractBeanContainerTest.java')
-rw-r--r-- | tests/server-side/com/vaadin/data/util/AbstractBeanContainerTest.java | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/tests/server-side/com/vaadin/data/util/AbstractBeanContainerTest.java b/tests/server-side/com/vaadin/data/util/AbstractBeanContainerTest.java new file mode 100644 index 0000000000..3c74a45bd7 --- /dev/null +++ b/tests/server-side/com/vaadin/data/util/AbstractBeanContainerTest.java @@ -0,0 +1,81 @@ +package com.vaadin.data.util; + +import com.vaadin.data.util.AbstractBeanContainer; +import com.vaadin.data.util.BeanContainer; +import com.vaadin.data.util.BeanItemContainer; + +/** + * Automated test for {@link AbstractBeanContainer}. + * + * Only a limited subset of the functionality is tested here, the rest in tests + * of subclasses including {@link BeanItemContainer} and {@link BeanContainer}. + */ +public abstract class AbstractBeanContainerTest extends + AbstractInMemoryContainerTest { + + public static class Person { + private String name; + + public Person(String name) { + setName(name); + } + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } + } + + public static class ClassName { + // field names match constants in parent test class + private String fullyQualifiedName; + private String simpleName; + private String reverseFullyQualifiedName; + private Integer idNumber; + + public ClassName(String fullyQualifiedName, Integer idNumber) { + this.fullyQualifiedName = fullyQualifiedName; + simpleName = AbstractContainerTest + .getSimpleName(fullyQualifiedName); + reverseFullyQualifiedName = reverse(fullyQualifiedName); + this.idNumber = idNumber; + } + + public String getFullyQualifiedName() { + return fullyQualifiedName; + } + + public void setFullyQualifiedName(String fullyQualifiedName) { + this.fullyQualifiedName = fullyQualifiedName; + } + + public String getSimpleName() { + return simpleName; + } + + public void setSimpleName(String simpleName) { + this.simpleName = simpleName; + } + + public String getReverseFullyQualifiedName() { + return reverseFullyQualifiedName; + } + + public void setReverseFullyQualifiedName( + String reverseFullyQualifiedName) { + this.reverseFullyQualifiedName = reverseFullyQualifiedName; + } + + public Integer getIdNumber() { + return idNumber; + } + + public void setIdNumber(Integer idNumber) { + this.idNumber = idNumber; + } + } + +} |