aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2009-10-30 15:14:55 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2009-10-30 15:14:55 +0000
commit468df03be6de07f56dd4fe64981048d6057008d9 (patch)
treef2f5c6c1017bee9ef2d167d9847bcf5139733979 /tests/src
parent4105ae7c194ad8373174017312119837434ef23f (diff)
downloadvaadin-framework-468df03be6de07f56dd4fe64981048d6057008d9.tar.gz
vaadin-framework-468df03be6de07f56dd4fe64981048d6057008d9.zip
test case for #3624 method property constructor
svn changeset:9528/svn branch:6.2
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/com/vaadin/tests/TestMethodProperty.java48
1 files changed, 48 insertions, 0 deletions
diff --git a/tests/src/com/vaadin/tests/TestMethodProperty.java b/tests/src/com/vaadin/tests/TestMethodProperty.java
new file mode 100644
index 0000000000..d92006da6c
--- /dev/null
+++ b/tests/src/com/vaadin/tests/TestMethodProperty.java
@@ -0,0 +1,48 @@
+package com.vaadin.tests;
+
+import com.vaadin.data.util.MethodProperty;
+
+public class TestMethodProperty {
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) {
+
+ MyTest myTest = new MyTest();
+
+ MethodProperty methodProperty2 = new MethodProperty(Integer.TYPE,
+ myTest, "getInt", "setInt", new Object[0],
+ new Object[] { null }, 0);
+
+ methodProperty2.setValue("3");
+
+ System.out.println("Succeeded");
+
+ }
+
+ public static class MyTest {
+
+ int integer;
+
+ public void setInteger(Integer integer) {
+ System.out.println("setInteger");
+ this.integer = integer;
+ }
+
+ public Integer getInteger() {
+ System.out.println("getInteger");
+ return Integer.valueOf(integer);
+ }
+
+ public void setInt(int i) {
+ System.out.println("setInt");
+ integer = i;
+ }
+
+ public int getInt() {
+ System.out.println("getInt");
+ return integer;
+ }
+ }
+}