]> source.dussan.org Git - vaadin-framework.git/commitdiff
Test case for #3712 - CompositeErrorMessage does not work
authorArtur Signell <artur.signell@itmill.com>
Thu, 19 Nov 2009 11:25:15 +0000 (11:25 +0000)
committerArtur Signell <artur.signell@itmill.com>
Thu, 19 Nov 2009 11:25:15 +0000 (11:25 +0000)
svn changeset:9905/svn branch:6.2

tests/src/com/vaadin/tests/components/ErrorMessages.java [new file with mode: 0644]

diff --git a/tests/src/com/vaadin/tests/components/ErrorMessages.java b/tests/src/com/vaadin/tests/components/ErrorMessages.java
new file mode 100644 (file)
index 0000000..d4008a4
--- /dev/null
@@ -0,0 +1,44 @@
+package com.vaadin.tests.components;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.vaadin.terminal.CompositeErrorMessage;
+import com.vaadin.terminal.UserError;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.ComboBox;
+import com.vaadin.ui.TextField;
+
+public class ErrorMessages extends TestBase {
+
+    @Override
+    protected void setup() {
+        Button bb = new Button("Button with CompositeError");
+        List<UserError> errors = new ArrayList<UserError>();
+        errors.add(new UserError("Error 1"));
+        errors.add(new UserError("Error 2"));
+        bb.setComponentError(new CompositeErrorMessage(errors));
+        addComponent(bb);
+
+        TextField tf = new TextField("", "Textfield with UserError");
+        tf.setComponentError(new UserError("This is a failure"));
+        addComponent(tf);
+
+        ComboBox cb = new ComboBox("ComboBox with description and UserError");
+        cb.setDescription("This is a combobox");
+        cb.setComponentError(new UserError("This is a failure"));
+        addComponent(cb);
+
+    }
+
+    @Override
+    protected String getDescription() {
+        return "The components all have error messages that should appear when hovering them";
+    }
+
+    @Override
+    protected Integer getTicketNumber() {
+        return 3712;
+    }
+
+}