From b5b98e47441aa4ac587de097b22b25cc4852a4ec Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Wed, 4 Feb 2015 17:00:23 +0200 Subject: Revert "Grid now uses ObjectRenderer by default (#15417)" This reverts commit abaec0217b3351d6f1835d7095ed2a3958fbfcdb. Change-Id: I7f8de3ee803b6de1957ad04b5b1b3bf210783826 --- .../grid/GridUndefinedObjectConverter.java | 37 ---------------------- .../grid/GridUndefinedObjectConverterTest.java | 25 --------------- 2 files changed, 62 deletions(-) delete mode 100644 uitest/src/com/vaadin/tests/components/grid/GridUndefinedObjectConverter.java delete mode 100644 uitest/src/com/vaadin/tests/components/grid/GridUndefinedObjectConverterTest.java (limited to 'uitest/src') diff --git a/uitest/src/com/vaadin/tests/components/grid/GridUndefinedObjectConverter.java b/uitest/src/com/vaadin/tests/components/grid/GridUndefinedObjectConverter.java deleted file mode 100644 index fba2bbf698..0000000000 --- a/uitest/src/com/vaadin/tests/components/grid/GridUndefinedObjectConverter.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.vaadin.tests.components.grid; - -import com.vaadin.data.util.IndexedContainer; -import com.vaadin.server.VaadinRequest; -import com.vaadin.tests.components.AbstractTestUI; -import com.vaadin.ui.Grid; - -public class GridUndefinedObjectConverter extends AbstractTestUI { - private static class Pojo { - private final String content; - - public Pojo(String content) { - this.content = content; - } - - @Override - public String toString() { - return "Pojo:" + content; - } - } - - @Override - @SuppressWarnings("all") - protected void setup(VaadinRequest request) { - IndexedContainer container = new IndexedContainer(); - container.addContainerProperty("pojo", Pojo.class, new Pojo("foo")); - container.addContainerProperty("pojo object ", Object.class, new Pojo( - "bar")); - container.addContainerProperty("int", Integer.class, 1); - container.addContainerProperty("int object", Object.class, 2); - container.addContainerProperty("string", String.class, "foo"); - container.addContainerProperty("string object", Object.class, "bar"); - container.addItem(); - - addComponent(new Grid(container)); - } -} diff --git a/uitest/src/com/vaadin/tests/components/grid/GridUndefinedObjectConverterTest.java b/uitest/src/com/vaadin/tests/components/grid/GridUndefinedObjectConverterTest.java deleted file mode 100644 index 401bfda885..0000000000 --- a/uitest/src/com/vaadin/tests/components/grid/GridUndefinedObjectConverterTest.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.vaadin.tests.components.grid; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; - -import com.vaadin.testbench.elements.GridElement; -import com.vaadin.tests.annotations.TestCategory; -import com.vaadin.tests.tb3.MultiBrowserTest; - -@TestCategory("grid") -public class GridUndefinedObjectConverterTest extends MultiBrowserTest { - @Test - public void testDefaultToStringRendering() { - openTestURL(); - - GridElement grid = $(GridElement.class).first(); - assertEquals("pojo", "Pojo:foo", grid.getCell(0, 0).getText()); - assertEquals("pojo object", "Pojo:bar", grid.getCell(0, 1).getText()); - assertEquals("int", "1", grid.getCell(0, 2).getText()); - assertEquals("int object", "2", grid.getCell(0, 3).getText()); - assertEquals("string", "foo", grid.getCell(0, 4).getText()); - assertEquals("string object", "bar", grid.getCell(0, 5).getText()); - } -} -- cgit v1.2.3