import com.vaadin.data.Property.ValueChangeEvent;\r
import com.vaadin.data.Property.ValueChangeListener;\r
import com.vaadin.data.util.IndexedContainer;\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
\r
-public class IndexedContainerListeners extends ListenerMethods {\r
+public class IndexedContainerListeners extends AbstractListenerMethodsTest {\r
public void testValueChangeListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(IndexedContainer.class,\r
ValueChangeEvent.class, ValueChangeListener.class);\r
import com.vaadin.data.Item.PropertySetChangeEvent;\r
import com.vaadin.data.Item.PropertySetChangeListener;\r
import com.vaadin.data.util.PropertysetItem;\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
\r
-public class PropertysetItemListeners extends ListenerMethods {\r
+public class PropertysetItemListeners extends AbstractListenerMethodsTest {\r
public void testPropertySetChangeListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(PropertysetItem.class,\r
PropertySetChangeEvent.class, PropertySetChangeListener.class);\r
import com.vaadin.data.Container.PropertySetChangeEvent;\r
import com.vaadin.data.Container.PropertySetChangeListener;\r
import com.vaadin.data.util.BeanItemContainer;\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
\r
-public class TestAbstractBeanContainerListeners extends ListenerMethods {\r
+public class TestAbstractBeanContainerListeners extends AbstractListenerMethodsTest {\r
public void testPropertySetChangeListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(BeanItemContainer.class,\r
PropertySetChangeEvent.class, PropertySetChangeListener.class,\r
import com.vaadin.data.Container.PropertySetChangeEvent;\r
import com.vaadin.data.Container.PropertySetChangeListener;\r
import com.vaadin.data.util.IndexedContainer;\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
\r
-public class TestAbstractContainerListeners extends ListenerMethods {\r
+public class TestAbstractContainerListeners extends AbstractListenerMethodsTest {\r
\r
public void testItemSetChangeListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(IndexedContainer.class,\r
import com.vaadin.data.Container.ItemSetChangeEvent;\r
import com.vaadin.data.Container.ItemSetChangeListener;\r
import com.vaadin.data.util.IndexedContainer;\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
\r
-public class TestAbstractInMemoryContainerListeners extends ListenerMethods {\r
+public class TestAbstractInMemoryContainerListeners extends AbstractListenerMethodsTest {\r
public void testItemSetChangeListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(IndexedContainer.class,\r
ItemSetChangeEvent.class, ItemSetChangeListener.class);\r
import com.vaadin.data.Property.ValueChangeListener;\r
import com.vaadin.data.util.AbstractProperty;\r
import com.vaadin.data.util.ObjectProperty;\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
\r
-public class TestAbstractPropertyListeners extends ListenerMethods {\r
+public class TestAbstractPropertyListeners extends AbstractListenerMethodsTest {\r
public void testValueChangeListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(AbstractProperty.class,\r
ValueChangeEvent.class, ValueChangeListener.class,\r
--- /dev/null
+package com.vaadin.tests.server.component;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+import junit.framework.TestCase;
+
+import org.easymock.EasyMock;
+import org.junit.Assert;
+
+import com.vaadin.tests.VaadinClasses;
+import com.vaadin.ui.Component;
+
+public abstract class AbstractListenerMethodsTest extends TestCase {
+
+ public static void main(String[] args) {
+ findAllListenerMethods();
+ }
+
+ private static void findAllListenerMethods() {
+ Set<Class<?>> classes = new HashSet<Class<?>>();
+ for (Class<?> c : VaadinClasses.getAllServerSideClasses()) {
+ while (c != null && c.getName().startsWith("com.vaadin.")) {
+ classes.add(c);
+ c = c.getSuperclass();
+ }
+ }
+
+ for (Class<?> c : classes) {
+ boolean found = false;
+ for (Method m : c.getDeclaredMethods()) {
+ if (m.getName().equals("addListener")) {
+ if (m.getParameterTypes().length != 1) {
+ continue;
+ }
+ String packageName = "com.vaadin.tests.server";
+ if (Component.class.isAssignableFrom(c)) {
+ packageName += ".component."
+ + c.getSimpleName().toLowerCase();
+ continue;
+ }
+
+ if (!found) {
+ found = true;
+ System.out.println("package " + packageName + ";");
+
+ System.out.println("import "
+ + AbstractListenerMethodsTest.class.getName() + ";");
+ System.out.println("import " + c.getName() + ";");
+ System.out.println("public class " + c.getSimpleName()
+ + "Listeners extends "
+ + AbstractListenerMethodsTest.class.getSimpleName() + " {");
+ }
+
+ String listenerClassName = m.getParameterTypes()[0]
+ .getSimpleName();
+ String eventClassName = listenerClassName.replaceFirst(
+ "Listener$", "Event");
+ System.out.println("public void test" + listenerClassName
+ + "() throws Exception {");
+ System.out.println(" testListener(" + c.getSimpleName()
+ + ".class, " + eventClassName + ".class, "
+ + listenerClassName + ".class);");
+ System.out.println("}");
+ }
+ }
+ if (found) {
+ System.out.println("}");
+ System.out.println();
+ }
+ }
+ }
+
+ protected void testListenerAddGetRemove(Class<?> testClass,
+ Class<?> eventClass, Class<?> listenerClass) throws Exception {
+ // Create a component for testing
+ Object c = testClass.newInstance();
+ testListenerAddGetRemove(testClass, eventClass, listenerClass, c);
+
+ }
+
+ protected void testListenerAddGetRemove(Class<?> cls, Class<?> eventClass,
+ Class<?> listenerClass, Object c) throws Exception {
+
+ Object mockListener1 = EasyMock.createMock(listenerClass);
+ Object mockListener2 = EasyMock.createMock(listenerClass);
+
+ // Verify we start from no listeners
+ verifyListeners(c, eventClass);
+
+ // Add one listener and verify
+ addListener(c, mockListener1, listenerClass);
+ verifyListeners(c, eventClass, mockListener1);
+
+ // Add another listener and verify
+ addListener(c, mockListener2, listenerClass);
+ verifyListeners(c, eventClass, mockListener1, mockListener2);
+
+ // Ensure we can fetch using parent class also
+ if (eventClass.getSuperclass() != null) {
+ verifyListeners(c, eventClass.getSuperclass(), mockListener1,
+ mockListener2);
+ }
+
+ // Remove the first and verify
+ removeListener(c, mockListener1, listenerClass);
+ verifyListeners(c, eventClass, mockListener2);
+
+ // Remove the remaining and verify
+ removeListener(c, mockListener2, listenerClass);
+ verifyListeners(c, eventClass);
+
+ }
+
+ private void removeListener(Object c, Object listener,
+ Class<?> listenerClass) throws IllegalArgumentException,
+ IllegalAccessException, InvocationTargetException,
+ SecurityException, NoSuchMethodException {
+ Method method = getRemoveListenerMethod(c.getClass(), listenerClass);
+ method.invoke(c, listener);
+
+ }
+
+ private void addListener(Object c, Object listener1, Class<?> listenerClass)
+ throws IllegalArgumentException, IllegalAccessException,
+ InvocationTargetException, SecurityException, NoSuchMethodException {
+ Method method = getAddListenerMethod(c.getClass(), listenerClass);
+ method.invoke(c, listener1);
+ }
+
+ private Collection<?> getListeners(Object c, Class<?> eventType)
+ throws IllegalArgumentException, IllegalAccessException,
+ InvocationTargetException, SecurityException, NoSuchMethodException {
+ Method method = getGetListenersMethod(c.getClass());
+ return (Collection<?>) method.invoke(c, eventType);
+ }
+
+ private Method getGetListenersMethod(Class<? extends Object> cls)
+ throws SecurityException, NoSuchMethodException {
+ return cls.getMethod("getListeners", Class.class);
+ }
+
+ private Method getAddListenerMethod(Class<?> cls, Class<?> listenerClass)
+ throws SecurityException, NoSuchMethodException {
+ return cls.getMethod("addListener", listenerClass);
+
+ }
+
+ private Method getRemoveListenerMethod(Class<?> cls, Class<?> listenerClass)
+ throws SecurityException, NoSuchMethodException {
+ return cls.getMethod("removeListener", listenerClass);
+
+ }
+
+ private void verifyListeners(Object c, Class<?> eventClass,
+ Object... expectedListeners) throws IllegalArgumentException,
+ SecurityException, IllegalAccessException,
+ InvocationTargetException, NoSuchMethodException {
+ Collection<?> registeredListeners = getListeners(c, eventClass);
+ assertEquals("Number of listeners", expectedListeners.length,
+ registeredListeners.size());
+
+ Assert.assertArrayEquals(expectedListeners,
+ registeredListeners.toArray());
+
+ }
+}
+++ /dev/null
-package com.vaadin.tests.server.component;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
-import junit.framework.TestCase;
-
-import org.easymock.EasyMock;
-import org.junit.Assert;
-
-import com.vaadin.tests.VaadinClasses;
-import com.vaadin.ui.Component;
-
-public abstract class ListenerMethods extends TestCase {
-
- public void testDummy() {
- }
-
- public static void main(String[] args) {
- findAllListenerMethods();
- }
-
- private static void findAllListenerMethods() {
- Set<Class<?>> classes = new HashSet<Class<?>>();
- for (Class<?> c : VaadinClasses.getAllServerSideClasses()) {
- while (c != null && c.getName().startsWith("com.vaadin.")) {
- classes.add(c);
- c = c.getSuperclass();
- }
- }
-
- for (Class<?> c : classes) {
- boolean found = false;
- for (Method m : c.getDeclaredMethods()) {
- if (m.getName().equals("addListener")) {
- if (m.getParameterTypes().length != 1) {
- continue;
- }
- String packageName = "com.vaadin.tests.server";
- if (Component.class.isAssignableFrom(c)) {
- packageName += ".component."
- + c.getSimpleName().toLowerCase();
- continue;
- }
-
- if (!found) {
- found = true;
- System.out.println("package " + packageName + ";");
-
- System.out.println("import "
- + ListenerMethods.class.getName() + ";");
- System.out.println("import " + c.getName() + ";");
- System.out.println("public class " + c.getSimpleName()
- + "Listeners extends "
- + ListenerMethods.class.getSimpleName() + " {");
- }
-
- String listenerClassName = m.getParameterTypes()[0]
- .getSimpleName();
- String eventClassName = listenerClassName.replaceFirst(
- "Listener$", "Event");
- System.out.println("public void test" + listenerClassName
- + "() throws Exception {");
- System.out.println(" testListener(" + c.getSimpleName()
- + ".class, " + eventClassName + ".class, "
- + listenerClassName + ".class);");
- System.out.println("}");
- }
- }
- if (found) {
- System.out.println("}");
- System.out.println();
- }
- }
- }
-
- protected void testListenerAddGetRemove(Class<?> testClass,
- Class<?> eventClass, Class<?> listenerClass) throws Exception {
- // Create a component for testing
- Object c = testClass.newInstance();
- testListenerAddGetRemove(testClass, eventClass, listenerClass, c);
-
- }
-
- protected void testListenerAddGetRemove(Class<?> cls, Class<?> eventClass,
- Class<?> listenerClass, Object c) throws Exception {
-
- Object mockListener1 = EasyMock.createMock(listenerClass);
- Object mockListener2 = EasyMock.createMock(listenerClass);
-
- // Verify we start from no listeners
- verifyListeners(c, eventClass);
-
- // Add one listener and verify
- addListener(c, mockListener1, listenerClass);
- verifyListeners(c, eventClass, mockListener1);
-
- // Add another listener and verify
- addListener(c, mockListener2, listenerClass);
- verifyListeners(c, eventClass, mockListener1, mockListener2);
-
- // Ensure we can fetch using parent class also
- if (eventClass.getSuperclass() != null) {
- verifyListeners(c, eventClass.getSuperclass(), mockListener1,
- mockListener2);
- }
-
- // Remove the first and verify
- removeListener(c, mockListener1, listenerClass);
- verifyListeners(c, eventClass, mockListener2);
-
- // Remove the remaining and verify
- removeListener(c, mockListener2, listenerClass);
- verifyListeners(c, eventClass);
-
- }
-
- private void removeListener(Object c, Object listener,
- Class<?> listenerClass) throws IllegalArgumentException,
- IllegalAccessException, InvocationTargetException,
- SecurityException, NoSuchMethodException {
- Method method = getRemoveListenerMethod(c.getClass(), listenerClass);
- method.invoke(c, listener);
-
- }
-
- private void addListener(Object c, Object listener1, Class<?> listenerClass)
- throws IllegalArgumentException, IllegalAccessException,
- InvocationTargetException, SecurityException, NoSuchMethodException {
- Method method = getAddListenerMethod(c.getClass(), listenerClass);
- method.invoke(c, listener1);
- }
-
- private Collection<?> getListeners(Object c, Class<?> eventType)
- throws IllegalArgumentException, IllegalAccessException,
- InvocationTargetException, SecurityException, NoSuchMethodException {
- Method method = getGetListenersMethod(c.getClass());
- return (Collection<?>) method.invoke(c, eventType);
- }
-
- private Method getGetListenersMethod(Class<? extends Object> cls)
- throws SecurityException, NoSuchMethodException {
- return cls.getMethod("getListeners", Class.class);
- }
-
- private Method getAddListenerMethod(Class<?> cls, Class<?> listenerClass)
- throws SecurityException, NoSuchMethodException {
- return cls.getMethod("addListener", listenerClass);
-
- }
-
- private Method getRemoveListenerMethod(Class<?> cls, Class<?> listenerClass)
- throws SecurityException, NoSuchMethodException {
- return cls.getMethod("removeListener", listenerClass);
-
- }
-
- private void verifyListeners(Object c, Class<?> eventClass,
- Object... expectedListeners) throws IllegalArgumentException,
- SecurityException, IllegalAccessException,
- InvocationTargetException, NoSuchMethodException {
- Collection<?> registeredListeners = getListeners(c, eventClass);
- assertEquals("Number of listeners", expectedListeners.length,
- registeredListeners.size());
-
- Assert.assertArrayEquals(expectedListeners,
- registeredListeners.toArray());
-
- }
-}
\r
import com.vaadin.event.LayoutEvents.LayoutClickEvent;\r
import com.vaadin.event.LayoutEvents.LayoutClickListener;\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
import com.vaadin.ui.AbsoluteLayout;\r
\r
-public class AbsoluteLayoutListeners extends ListenerMethods {\r
+public class AbsoluteLayoutListeners extends AbstractListenerMethodsTest {\r
public void testLayoutClickListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(AbsoluteLayout.class, LayoutClickEvent.class,\r
LayoutClickListener.class);\r
package com.vaadin.tests.server.component.abstractcomponentcontainer;\r
\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
import com.vaadin.ui.ComponentContainer.ComponentAttachEvent;\r
import com.vaadin.ui.ComponentContainer.ComponentAttachListener;\r
import com.vaadin.ui.ComponentContainer.ComponentDetachEvent;\r
import com.vaadin.ui.HorizontalLayout;\r
import com.vaadin.ui.VerticalLayout;\r
\r
-public class TestAbstractComponentContainerListeners extends ListenerMethods {\r
+public class TestAbstractComponentContainerListeners extends AbstractListenerMethodsTest {\r
public void testComponentDetachListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(HorizontalLayout.class,\r
ComponentDetachEvent.class, ComponentDetachListener.class);\r
import com.vaadin.data.Property.ReadOnlyStatusChangeListener;\r
import com.vaadin.data.Property.ValueChangeEvent;\r
import com.vaadin.data.Property.ValueChangeListener;\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
import com.vaadin.ui.Button;\r
\r
-public class TestAbstractFieldListeners extends ListenerMethods {\r
+public class TestAbstractFieldListeners extends AbstractListenerMethodsTest {\r
public void testReadOnlyStatusChangeListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(Button.class, ReadOnlyStatusChangeEvent.class,\r
ReadOnlyStatusChangeListener.class);\r
\r
import com.vaadin.event.LayoutEvents.LayoutClickEvent;\r
import com.vaadin.event.LayoutEvents.LayoutClickListener;\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
import com.vaadin.ui.VerticalLayout;\r
\r
-public class TestAbstractOrderedLayoutListeners extends ListenerMethods {\r
+public class TestAbstractOrderedLayoutListeners extends AbstractListenerMethodsTest {\r
public void testLayoutClickListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(VerticalLayout.class, LayoutClickEvent.class,\r
LayoutClickListener.class);\r
import com.vaadin.data.Container.ItemSetChangeListener;\r
import com.vaadin.data.Container.PropertySetChangeEvent;\r
import com.vaadin.data.Container.PropertySetChangeListener;\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
import com.vaadin.ui.ComboBox;\r
\r
-public class TestAbstractSelectListeners extends ListenerMethods {\r
+public class TestAbstractSelectListeners extends AbstractListenerMethodsTest {\r
public void testItemSetChangeListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(ComboBox.class, ItemSetChangeEvent.class,\r
ItemSetChangeListener.class);\r
package com.vaadin.tests.server.component.abstractsplitpanel;\r
\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
import com.vaadin.ui.AbstractSplitPanel.SplitterClickEvent;\r
import com.vaadin.ui.AbstractSplitPanel.SplitterClickListener;\r
import com.vaadin.ui.HorizontalSplitPanel;\r
\r
-public class TestAbstractSplitPanelListeners extends ListenerMethods {\r
+public class TestAbstractSplitPanelListeners extends AbstractListenerMethodsTest {\r
public void testSplitterClickListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(HorizontalSplitPanel.class,\r
SplitterClickEvent.class, SplitterClickListener.class);\r
import com.vaadin.event.FieldEvents.FocusListener;\r
import com.vaadin.event.FieldEvents.TextChangeEvent;\r
import com.vaadin.event.FieldEvents.TextChangeListener;\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
import com.vaadin.ui.TextField;\r
\r
-public class TestAbstractTextFieldListeners extends ListenerMethods {\r
+public class TestAbstractTextFieldListeners extends AbstractListenerMethodsTest {\r
public void testTextChangeListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(TextField.class, TextChangeEvent.class,\r
TextChangeListener.class);\r
import com.vaadin.event.FieldEvents.BlurListener;\r
import com.vaadin.event.FieldEvents.FocusEvent;\r
import com.vaadin.event.FieldEvents.FocusListener;\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
import com.vaadin.ui.Button;\r
import com.vaadin.ui.Button.ClickEvent;\r
import com.vaadin.ui.Button.ClickListener;\r
\r
-public class ButtonListeners extends ListenerMethods {\r
+public class ButtonListeners extends AbstractListenerMethodsTest {\r
public void testFocusListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(Button.class, FocusEvent.class,\r
FocusListener.class);\r
\r
import com.vaadin.event.LayoutEvents.LayoutClickEvent;\r
import com.vaadin.event.LayoutEvents.LayoutClickListener;\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
import com.vaadin.ui.CssLayout;\r
\r
-public class CssLayoutListeners extends ListenerMethods {\r
+public class CssLayoutListeners extends AbstractListenerMethodsTest {\r
public void testLayoutClickListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(CssLayout.class, LayoutClickEvent.class,\r
LayoutClickListener.class);\r
import com.vaadin.event.FieldEvents.BlurListener;\r
import com.vaadin.event.FieldEvents.FocusEvent;\r
import com.vaadin.event.FieldEvents.FocusListener;\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
import com.vaadin.ui.DateField;\r
\r
-public class DateFieldListeners extends ListenerMethods {\r
+public class DateFieldListeners extends AbstractListenerMethodsTest {\r
public void testFocusListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(DateField.class, FocusEvent.class,\r
FocusListener.class);\r
\r
import com.vaadin.event.MouseEvents.ClickEvent;\r
import com.vaadin.event.MouseEvents.ClickListener;\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
import com.vaadin.ui.Embedded;\r
\r
-public class EmbeddedListeners extends ListenerMethods {\r
+public class EmbeddedListeners extends AbstractListenerMethodsTest {\r
public void testClickListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(Embedded.class, ClickEvent.class,\r
ClickListener.class);\r
\r
import com.vaadin.event.LayoutEvents.LayoutClickEvent;\r
import com.vaadin.event.LayoutEvents.LayoutClickListener;\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
import com.vaadin.ui.GridLayout;\r
\r
-public class GridLayoutListeners extends ListenerMethods {\r
+public class GridLayoutListeners extends AbstractListenerMethodsTest {\r
public void testLayoutClickListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(GridLayout.class, LayoutClickEvent.class,\r
LayoutClickListener.class);\r
package com.vaadin.tests.server.component.label;\r
\r
import com.vaadin.data.Property.ValueChangeListener;\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
import com.vaadin.ui.Label;\r
import com.vaadin.ui.Label.ValueChangeEvent;\r
\r
-public class LabelListeners extends ListenerMethods {\r
+public class LabelListeners extends AbstractListenerMethodsTest {\r
public void testValueChangeListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(Label.class, ValueChangeEvent.class,\r
ValueChangeListener.class);\r
package com.vaadin.tests.server.component.loginform;\r
\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
import com.vaadin.ui.LoginForm;\r
import com.vaadin.ui.LoginForm.LoginEvent;\r
import com.vaadin.ui.LoginForm.LoginListener;\r
\r
-public class LoginFormListeners extends ListenerMethods {\r
+public class LoginFormListeners extends AbstractListenerMethodsTest {\r
public void testLoginListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(LoginForm.class, LoginEvent.class,\r
LoginListener.class);\r
import com.vaadin.event.FieldEvents.BlurListener;\r
import com.vaadin.event.FieldEvents.FocusEvent;\r
import com.vaadin.event.FieldEvents.FocusListener;\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
import com.vaadin.ui.OptionGroup;\r
\r
-public class OptionGroupListeners extends ListenerMethods {\r
+public class OptionGroupListeners extends AbstractListenerMethodsTest {\r
public void testFocusListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(OptionGroup.class, FocusEvent.class,\r
FocusListener.class);\r
\r
import com.vaadin.event.MouseEvents.ClickEvent;\r
import com.vaadin.event.MouseEvents.ClickListener;\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
import com.vaadin.ui.Panel;\r
\r
-public class PanelListeners extends ListenerMethods {\r
+public class PanelListeners extends AbstractListenerMethodsTest {\r
public void testClickListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(Panel.class, ClickEvent.class,\r
ClickListener.class);\r
package com.vaadin.tests.server.component.popupview;\r
\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
import com.vaadin.ui.Label;\r
import com.vaadin.ui.PopupView;\r
import com.vaadin.ui.PopupView.PopupVisibilityEvent;\r
import com.vaadin.ui.PopupView.PopupVisibilityListener;\r
\r
-public class PopupViewListeners extends ListenerMethods {\r
+public class PopupViewListeners extends AbstractListenerMethodsTest {\r
public void testPopupVisibilityListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(PopupView.class, PopupVisibilityEvent.class,\r
PopupVisibilityListener.class, new PopupView("", new Label()));\r
import com.vaadin.event.FieldEvents.BlurListener;\r
import com.vaadin.event.FieldEvents.FocusEvent;\r
import com.vaadin.event.FieldEvents.FocusListener;\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
import com.vaadin.ui.Select;\r
\r
-public class SelectListeners extends ListenerMethods {\r
+public class SelectListeners extends AbstractListenerMethodsTest {\r
public void testFocusListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(Select.class, FocusEvent.class,\r
FocusListener.class);\r
\r
import com.vaadin.event.ItemClickEvent;\r
import com.vaadin.event.ItemClickEvent.ItemClickListener;\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
import com.vaadin.ui.Table;\r
import com.vaadin.ui.Table.ColumnReorderEvent;\r
import com.vaadin.ui.Table.ColumnReorderListener;\r
import com.vaadin.ui.Table.HeaderClickEvent;\r
import com.vaadin.ui.Table.HeaderClickListener;\r
\r
-public class TableListeners extends ListenerMethods {\r
+public class TableListeners extends AbstractListenerMethodsTest {\r
public void testColumnResizeListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(Table.class, ColumnResizeEvent.class,\r
ColumnResizeListener.class);\r
package com.vaadin.tests.server.component.tabsheet;\r
\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
import com.vaadin.ui.TabSheet;\r
import com.vaadin.ui.TabSheet.SelectedTabChangeEvent;\r
import com.vaadin.ui.TabSheet.SelectedTabChangeListener;\r
\r
-public class TabSheetListeners extends ListenerMethods {\r
+public class TabSheetListeners extends AbstractListenerMethodsTest {\r
public void testSelectedTabChangeListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(TabSheet.class, SelectedTabChangeEvent.class,\r
SelectedTabChangeListener.class);\r
\r
import com.vaadin.event.ItemClickEvent;\r
import com.vaadin.event.ItemClickEvent.ItemClickListener;\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
import com.vaadin.ui.Tree;\r
import com.vaadin.ui.Tree.CollapseEvent;\r
import com.vaadin.ui.Tree.CollapseListener;\r
import com.vaadin.ui.Tree.ExpandEvent;\r
import com.vaadin.ui.Tree.ExpandListener;\r
\r
-public class TreeListeners extends ListenerMethods {\r
+public class TreeListeners extends AbstractListenerMethodsTest {\r
public void testExpandListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(Tree.class, ExpandEvent.class,\r
ExpandListener.class);\r
package com.vaadin.tests.server.component.upload;\r
\r
import com.vaadin.terminal.StreamVariable.StreamingProgressEvent;\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
import com.vaadin.ui.Upload;\r
import com.vaadin.ui.Upload.FailedEvent;\r
import com.vaadin.ui.Upload.FailedListener;\r
import com.vaadin.ui.Upload.SucceededEvent;\r
import com.vaadin.ui.Upload.SucceededListener;\r
\r
-public class UploadListeners extends ListenerMethods {\r
+public class UploadListeners extends AbstractListenerMethodsTest {\r
public void testProgressListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(Upload.class, StreamingProgressEvent.class,\r
ProgressListener.class);\r
package com.vaadin.tests.server.component.urifragmentutility;\r
\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
import com.vaadin.ui.UriFragmentUtility;\r
import com.vaadin.ui.UriFragmentUtility.FragmentChangedEvent;\r
import com.vaadin.ui.UriFragmentUtility.FragmentChangedListener;\r
\r
-public class UriFragmentUtilityListeners extends ListenerMethods {\r
+public class UriFragmentUtilityListeners extends AbstractListenerMethodsTest {\r
public void testFragmentChangedListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(UriFragmentUtility.class,\r
FragmentChangedEvent.class, FragmentChangedListener.class);\r
import com.vaadin.event.FieldEvents.BlurListener;\r
import com.vaadin.event.FieldEvents.FocusEvent;\r
import com.vaadin.event.FieldEvents.FocusListener;\r
-import com.vaadin.tests.server.component.ListenerMethods;\r
+import com.vaadin.tests.server.component.AbstractListenerMethodsTest;\r
import com.vaadin.ui.Window;\r
import com.vaadin.ui.Window.CloseEvent;\r
import com.vaadin.ui.Window.CloseListener;\r
import com.vaadin.ui.Window.ResizeEvent;\r
import com.vaadin.ui.Window.ResizeListener;\r
\r
-public class WindowListeners extends ListenerMethods {\r
+public class WindowListeners extends AbstractListenerMethodsTest {\r
public void testFocusListenerAddGetRemove() throws Exception {\r
testListenerAddGetRemove(Window.class, FocusEvent.class,\r
FocusListener.class);\r