From 800efdee9d891fb07343b18bca7cd543ffebb615 Mon Sep 17 00:00:00 2001 From: Leif Åstrand Date: Mon, 17 Sep 2012 09:44:03 +0300 Subject: Include getWidget return type even if createWidget is defined (#9561) --- .../serialization/DelegateWithoutStateClass.html | 26 +++++++++++++ .../DelegateWithoutStateClassTest.java | 45 ++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 uitest/src/com/vaadin/tests/serialization/DelegateWithoutStateClass.html create mode 100644 uitest/src/com/vaadin/tests/serialization/DelegateWithoutStateClassTest.java (limited to 'uitest/src/com/vaadin/tests/serialization') diff --git a/uitest/src/com/vaadin/tests/serialization/DelegateWithoutStateClass.html b/uitest/src/com/vaadin/tests/serialization/DelegateWithoutStateClass.html new file mode 100644 index 0000000000..2ee77b2d9f --- /dev/null +++ b/uitest/src/com/vaadin/tests/serialization/DelegateWithoutStateClass.html @@ -0,0 +1,26 @@ + + + + + + +New Test + + + + + + + + + + + + + + + + +
New Test
open/run/com.vaadin.tests.serialization.DelegateWithoutStateClassTest?restartApplication
assertAttributevaadin=runcomvaadintestsserializationDelegateWithoutStateClassTest::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VExtendedTextArea[0]@rows10
+ + diff --git a/uitest/src/com/vaadin/tests/serialization/DelegateWithoutStateClassTest.java b/uitest/src/com/vaadin/tests/serialization/DelegateWithoutStateClassTest.java new file mode 100644 index 0000000000..29975dda91 --- /dev/null +++ b/uitest/src/com/vaadin/tests/serialization/DelegateWithoutStateClassTest.java @@ -0,0 +1,45 @@ +/* + * Copyright 2011 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.vaadin.tests.serialization; + +import com.vaadin.annotations.Widgetset; +import com.vaadin.server.WrappedRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.tests.widgetset.TestingWidgetSet; +import com.vaadin.tests.widgetset.server.DelegateWithoutStateClassComponent; + +@Widgetset(TestingWidgetSet.NAME) +public class DelegateWithoutStateClassTest extends AbstractTestUI { + + @Override + protected void setup(WrappedRequest request) { + DelegateWithoutStateClassComponent c = new DelegateWithoutStateClassComponent(); + c.setRows(10); + addComponent(c); + } + + @Override + protected String getTestDescription() { + return "The height of the text area should be 10 rows if @DelegateToWidget works properly for widget subclasses even if there is no state subclass."; + } + + @Override + protected Integer getTicketNumber() { + return Integer.valueOf(9561); + } + +} -- cgit v1.2.3