From c6797a3792d598ec6cafebe4333b70aab2beb279 Mon Sep 17 00:00:00 2001
From: Artur Signell <artur@vaadin.com>
Date: Mon, 24 Sep 2012 19:32:07 +0300
Subject: Updated tests to only pass strings to Label.setValue

---
 .../vaadin/tests/components/combobox/ComboBoxDataSourceChange.java    | 3 ++-
 uitest/src/com/vaadin/tests/components/label/LabelTest.java           | 4 ++--
 .../com/vaadin/tests/components/textarea/TextAreaCursorPosition.java  | 3 ++-
 uitest/src/com/vaadin/tests/components/tree/CtrlShiftMultiselect.java | 4 ++--
 uitest/src/com/vaadin/tests/components/tree/ExpandCollapseTree.java   | 4 ++--
 uitest/src/com/vaadin/tests/components/tree/TreeContainerChange.java  | 3 ++-
 .../src/com/vaadin/tests/integration/IntegrationTestApplication.java  | 2 +-
 uitest/src/com/vaadin/tests/tickets/Ticket1581.java                   | 2 +-
 8 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxDataSourceChange.java b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxDataSourceChange.java
index a475c86ca0..1f2973ccb7 100644
--- a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxDataSourceChange.java
+++ b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxDataSourceChange.java
@@ -86,7 +86,8 @@ public class ComboBoxDataSourceChange extends TestBase {
         cb2.addListener(new Property.ValueChangeListener() {
             @Override
             public void valueChange(ValueChangeEvent event) {
-                currentValue.setValue(event.getProperty().getValue());
+                currentValue
+                        .setValue(event.getProperty().getValue().toString());
             }
         });
     }
diff --git a/uitest/src/com/vaadin/tests/components/label/LabelTest.java b/uitest/src/com/vaadin/tests/components/label/LabelTest.java
index 4b213b7a42..5db2669f95 100644
--- a/uitest/src/com/vaadin/tests/components/label/LabelTest.java
+++ b/uitest/src/com/vaadin/tests/components/label/LabelTest.java
@@ -12,10 +12,10 @@ import com.vaadin.ui.Label;
 public class LabelTest extends AbstractComponentTest<Label> implements
         ValueChangeListener {
 
-    private Command<Label, Object> setValueCommand = new Command<Label, Object>() {
+    private Command<Label, String> setValueCommand = new Command<Label, String>() {
 
         @Override
-        public void execute(Label c, Object value, Object data) {
+        public void execute(Label c, String value, Object data) {
             c.setValue(value);
         }
     };
diff --git a/uitest/src/com/vaadin/tests/components/textarea/TextAreaCursorPosition.java b/uitest/src/com/vaadin/tests/components/textarea/TextAreaCursorPosition.java
index 992f20843b..756970898e 100644
--- a/uitest/src/com/vaadin/tests/components/textarea/TextAreaCursorPosition.java
+++ b/uitest/src/com/vaadin/tests/components/textarea/TextAreaCursorPosition.java
@@ -37,7 +37,8 @@ public class TextAreaCursorPosition extends TestBase {
             public void textChange(TextChangeEvent event) {
                 AbstractTextField component = (AbstractTextField) event
                         .getComponent();
-                cursorPosition.setValue(component.getCursorPosition());
+                cursorPosition.setValue(String.valueOf(component
+                        .getCursorPosition()));
             }
         });
     }
diff --git a/uitest/src/com/vaadin/tests/components/tree/CtrlShiftMultiselect.java b/uitest/src/com/vaadin/tests/components/tree/CtrlShiftMultiselect.java
index 03645557f2..3ce2e38eba 100644
--- a/uitest/src/com/vaadin/tests/components/tree/CtrlShiftMultiselect.java
+++ b/uitest/src/com/vaadin/tests/components/tree/CtrlShiftMultiselect.java
@@ -39,10 +39,10 @@ public class CtrlShiftMultiselect extends TestBase {
                     if (itemIds.size() == 0) {
                         valueLbl.setValue("No selection");
                     } else {
-                        valueLbl.setValue(itemIds);
+                        valueLbl.setValue(itemIds.toString());
                     }
                 } else {
-                    valueLbl.setValue(tree.getValue());
+                    valueLbl.setValue(tree.getValue().toString());
                 }
             }
         });
diff --git a/uitest/src/com/vaadin/tests/components/tree/ExpandCollapseTree.java b/uitest/src/com/vaadin/tests/components/tree/ExpandCollapseTree.java
index d5c3654b4e..81e177c39b 100644
--- a/uitest/src/com/vaadin/tests/components/tree/ExpandCollapseTree.java
+++ b/uitest/src/com/vaadin/tests/components/tree/ExpandCollapseTree.java
@@ -39,10 +39,10 @@ public class ExpandCollapseTree extends TestBase {
                     if (itemIds.size() == 0) {
                         valueLbl.setValue("No selection");
                     } else {
-                        valueLbl.setValue(itemIds);
+                        valueLbl.setValue(itemIds.toString());
                     }
                 } else {
-                    valueLbl.setValue(tree.getValue());
+                    valueLbl.setValue(tree.getValue().toString());
                 }
             }
         });
diff --git a/uitest/src/com/vaadin/tests/components/tree/TreeContainerChange.java b/uitest/src/com/vaadin/tests/components/tree/TreeContainerChange.java
index f4374ca2ee..2dde7bbb30 100644
--- a/uitest/src/com/vaadin/tests/components/tree/TreeContainerChange.java
+++ b/uitest/src/com/vaadin/tests/components/tree/TreeContainerChange.java
@@ -86,7 +86,8 @@ public class TreeContainerChange extends TestBase {
         tree.addListener(new Property.ValueChangeListener() {
             @Override
             public void valueChange(ValueChangeEvent event) {
-                currentValue.setValue(event.getProperty().getValue());
+                currentValue
+                        .setValue(event.getProperty().getValue().toString());
             }
         });
     }
diff --git a/uitest/src/com/vaadin/tests/integration/IntegrationTestApplication.java b/uitest/src/com/vaadin/tests/integration/IntegrationTestApplication.java
index 03af8bbd52..41b7b020f5 100644
--- a/uitest/src/com/vaadin/tests/integration/IntegrationTestApplication.java
+++ b/uitest/src/com/vaadin/tests/integration/IntegrationTestApplication.java
@@ -38,7 +38,7 @@ public class IntegrationTestApplication extends LegacyApplication {
         table.addListener(new ValueChangeListener() {
             @Override
             public void valueChange(ValueChangeEvent event) {
-                selectedLabel.setValue(table.getValue());
+                selectedLabel.setValue(table.getValue().toString());
             }
         });
         window.addComponent(selectedLabel);
diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket1581.java b/uitest/src/com/vaadin/tests/tickets/Ticket1581.java
index 5f278a44f5..a29fba9bff 100644
--- a/uitest/src/com/vaadin/tests/tickets/Ticket1581.java
+++ b/uitest/src/com/vaadin/tests/tickets/Ticket1581.java
@@ -35,7 +35,7 @@ public class Ticket1581 extends com.vaadin.LegacyApplication {
             public void run() {
                 super.run();
                 while (true) {
-                    time.setValue(new Date());
+                    time.setValue(new Date().toString());
                     try {
                         sleep(200);
                     } catch (InterruptedException e) {
-- 
cgit v1.2.3