Examples of EventSetDescriptor


Examples of java.beans.EventSetDescriptor

                        new Class[] { MockPropertyChangeEvent.class }), };
        Class<MockSourceClass> sourceClass = MockSourceClass.class;
        Method removeMethod = sourceClass.getMethod(
                "removeMockPropertyChangeListener",
                new Class[] { listenerType });
        EventSetDescriptor esd = new EventSetDescriptor(eventSetName,
                listenerType, listenerMethods, null, removeMethod);

        assertNull(esd.getAddListenerMethod());
    }
View Full Code Here

Examples of java.beans.EventSetDescriptor

        Method addMethod = sourceClass.getMethod(
                "addMockPropertyChangeListener_Invalid", (Class[]) null);
        Method removeMethod = sourceClass.getMethod(
                "removeMockPropertyChangeListener",
                new Class[] { listenerType });
        EventSetDescriptor esd = new EventSetDescriptor(eventSetName,
                listenerType, listenerMethods, addMethod, removeMethod);
        assertEquals(addMethod, esd.getAddListenerMethod());
    }
View Full Code Here

Examples of java.beans.EventSetDescriptor

                listenerType.getMethod("mockPropertyChange",
                        new Class[] { MockPropertyChangeEvent.class }),
                listenerType.getMethod("mockPropertyChange2",
                        new Class[] { MockPropertyChangeEvent.class }), };

        EventSetDescriptor esd = new EventSetDescriptor(eventSetName,
                listenerType, listenerMethods, null, null);
        assertNull(esd.getRemoveListenerMethod());
    }
View Full Code Here

Examples of java.beans.EventSetDescriptor

        Class<MockSourceClass> sourceClass = MockSourceClass.class;
        Method addMethod = sourceClass.getMethod(
                "addMockPropertyChangeListener", new Class[] { listenerType });
        Method removeMethod = sourceClass.getMethod(
                "addMockPropertyChangeListener_Invalid", (Class[]) null);
        EventSetDescriptor esd = new EventSetDescriptor(eventSetName,
                listenerType, listenerMethods, addMethod, removeMethod);
        assertEquals(removeMethod, esd.getRemoveListenerMethod());
    }
View Full Code Here

Examples of java.beans.EventSetDescriptor

                "removeMockPropertyChangeListener",
                new Class[] { listenerType });
        Method getMethod = sourceClass.getMethod(
                "getMockPropertyChangeListener", new Class[] { listenerType });

        EventSetDescriptor esd = new EventSetDescriptor(eventSetName,
                listenerType, listenerMethods, addMethod, removeMethod,
                getMethod);

        assertEquals(getMethod, esd.getGetListenerMethod());
    }
View Full Code Here

Examples of java.beans.EventSetDescriptor

                "addMockPropertyChangeListener", new Class[] { listenerType });
        Method removeMethod = sourceClass.getMethod(
                "removeMockPropertyChangeListener",
                new Class[] { listenerType });

        EventSetDescriptor esd = new EventSetDescriptor(eventSetName,
                listenerType, listenerMethods, addMethod, removeMethod, null);
        assertNull(esd.getGetListenerMethod());
    }
View Full Code Here

Examples of java.beans.EventSetDescriptor

                "removeMockPropertyChangeListener",
                new Class[] { listenerType });
        Method getMethod = sourceClass.getMethod(
                "addMockPropertyChangeListener_Invalid", (Class[]) null);

        EventSetDescriptor esd = new EventSetDescriptor(eventSetName,
                listenerType, listenerMethods, addMethod, removeMethod,
                getMethod);
        assertEquals(getMethod, esd.getGetListenerMethod());
    }
View Full Code Here

Examples of java.beans.EventSetDescriptor

        Method addMethod = sourceClass.getMethod(
                "addMockPropertyChangeListener", listenerType);
        Method removeMethod = sourceClass.getMethod(
                "removeMockPropertyChangeListener", listenerType);

        EventSetDescriptor esd = new EventSetDescriptor(eventSetName,
                listenerType, listenerMethodDescriptors, addMethod,
                removeMethod);

        assertEquals(addMethod, esd.getAddListenerMethod());
        assertEquals(removeMethod, esd.getRemoveListenerMethod());
        assertNull(esd.getGetListenerMethod());
        assertEquals(listenerMethods[0], esd.getListenerMethods()[0]);
        assertEquals(listenerMethods[1], esd.getListenerMethods()[1]);

        assertEquals(2, esd.getListenerMethodDescriptors().length);
        assertEquals(listenerMethods[0], esd.getListenerMethodDescriptors()[0]
                .getMethod());
        assertEquals(listenerMethods[1], esd.getListenerMethodDescriptors()[1]
                .getMethod());

        assertEquals(listenerType, esd.getListenerType());
        assertTrue(esd.isInDefaultEventSet());
        assertFalse(esd.isUnicast());
    }
View Full Code Here

Examples of java.beans.EventSetDescriptor

        Method addMethod = sourceClass.getMethod(
                "addMockPropertyChangeListener", listenerType);
        Method removeMethod = sourceClass.getMethod(
                "removeMockPropertyChangeListener", listenerType);

        EventSetDescriptor esd = new EventSetDescriptor(eventSetName,
                listenerType, (MethodDescriptor[]) null, addMethod,
                removeMethod);

        assertNull(esd.getListenerMethodDescriptors());
        assertNull(esd.getListenerMethods());
    }
View Full Code Here

Examples of java.beans.EventSetDescriptor

                "addMockPropertyChangeListener", listenerType);
        Method removeMethod = sourceClass.getMethod(
                "removeMockPropertyChangeListener", listenerType);

        // RI doesn't check parameters of listener methods
        EventSetDescriptor esd = new EventSetDescriptor(eventSetName,
                listenerType, listenerMethodDescriptors, addMethod,
                removeMethod);

        assertEquals(0, esd.getListenerMethods()[1].getParameterTypes().length);
        assertEquals(listenerMethodDescriptors[1], esd
                .getListenerMethodDescriptors()[1]);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.