diff options
author | Johannes Dahlström <johannes.dahlstrom@vaadin.com> | 2012-04-13 08:26:32 +0000 |
---|---|---|
committer | Johannes Dahlström <johannes.dahlstrom@vaadin.com> | 2012-04-13 08:26:32 +0000 |
commit | ed20ba59aa3adb63118a3d6cd6ae986c4902793c (patch) | |
tree | 1883b8705b58863498bafb91dde5e90af2c92231 /tests | |
parent | 1e07642a6f7931855ccfc54560369a10ce4ff0df (diff) | |
download | vaadin-framework-ed20ba59aa3adb63118a3d6cd6ae986c4902793c.tar.gz vaadin-framework-ed20ba59aa3adb63118a3d6cd6ae986c4902793c.zip |
Reverted accidental commit
svn changeset:23523/svn branch:6.8
Diffstat (limited to 'tests')
-rw-r--r-- | tests/server-side/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/tests/server-side/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java b/tests/server-side/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java index c5bd688b3d..32b80e0bcd 100644 --- a/tests/server-side/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java +++ b/tests/server-side/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java @@ -16,7 +16,7 @@ public class RemoveListenersOnDetach { AbstractField field = new AbstractField() { @Override public Class<?> getType() { - return int.class; + return null; } @Override @@ -34,20 +34,17 @@ public class RemoveListenersOnDetach { }; Property property = new AbstractProperty() { - private int value; - public Object getValue() { - return value; + return null; } public void setValue(Object newValue) throws ReadOnlyException, ConversionException { - value = (Integer) newValue; fireValueChange(); } public Class<?> getType() { - return int.class; + return null; } }; @@ -55,28 +52,21 @@ public class RemoveListenersOnDetach { public void testAttachDetach() { field.setPropertyDataSource(property); - property.setValue(1); + property.setValue(null); property.setReadOnly(true); - assertEquals(1, field.getValue()); assertEquals(1, numValueChanges); assertEquals(1, numReadOnlyChanges); field.attach(); - property.setValue(2); + property.setValue(null); property.setReadOnly(false); - assertEquals(2, field.getValue()); assertEquals(2, numValueChanges); assertEquals(2, numReadOnlyChanges); field.detach(); - property.setValue(3); + property.setValue(null); property.setReadOnly(true); - assertEquals(3, field.getValue()); assertEquals(2, numValueChanges); assertEquals(2, numReadOnlyChanges); - - field.attach(); - assertEquals(3, field.getValue()); - assertEquals(3, numValueChanges); } } |