Package java.beans.beancontext

Examples of java.beans.beancontext.BeanContextChildSupport.addPropertyChangeListener()


                 "id of pcl2");
         MockVetoableChangeListener vcl1 = new MockVetoableChangeListener();
         MockVetoableChangeListenerS vcl2 = new MockVetoableChangeListenerS(
                 "id of vcl2");
         support.addPropertyChangeListener("beanContext", pcl1);
         support.addPropertyChangeListener("beanContext", pcl2);
         support.addVetoableChangeListener("beanContext", vcl1);
         support.addVetoableChangeListener("beanContext", vcl2);
         SerializationTest.verifyGolden(this, support, new SerializableAssert(){
             public void assertDeserialized(Serializable orig, Serializable ser) {
                 assertEqualsSerially((BeanContextChildSupport) orig,
View Full Code Here


        junit.textui.TestRunner.run(BeanContextChildSupportTest.class);
    }

    public void testAddPropertyChangeListener_NullParam() {
        BeanContextChildSupport support = new MockBeanContextChildSupport();
        support.addPropertyChangeListener(null, new MockPropertyChangeListener());
        support.addPropertyChangeListener("property name", null);
        support.firePropertyChange("property name", "old value",
                "new value");
    }
View Full Code Here

    }

    public void testAddPropertyChangeListener_NullParam() {
        BeanContextChildSupport support = new MockBeanContextChildSupport();
        support.addPropertyChangeListener(null, new MockPropertyChangeListener());
        support.addPropertyChangeListener("property name", null);
        support.firePropertyChange("property name", "old value",
                "new value");
    }

    public void testAddPropertyChangeListener() {
View Full Code Here

        l2.clearLastEvent();
        support.firePropertyChange(propName, oldValue, newValue);
        assertNull(l1.lastEvent);
        assertNull(l2.lastEvent);

        support.addPropertyChangeListener(propName, l1);
        l1.clearLastEvent();
        l2.clearLastEvent();
        support.firePropertyChange(propName, oldValue, newValue);
        assertEquals(propName, l1.lastEvent.getPropertyName());
        assertSame(oldValue, l1.lastEvent.getOldValue());
View Full Code Here

        assertSame(oldValue, l1.lastEvent.getOldValue());
        assertSame(newValue, l1.lastEvent.getNewValue());
        assertSame(support, l1.lastEvent.getSource());
        assertNull(l2.lastEvent);

        support.addPropertyChangeListener(propName, l2);
        l1.clearLastEvent();
        l2.clearLastEvent();
        support.firePropertyChange(propName, oldValue, newValue);
        assertEquals(propName, l1.lastEvent.getPropertyName());
        assertSame(oldValue, l1.lastEvent.getOldValue());
View Full Code Here

        MockPropertyChangeListener l2 = new MockPropertyChangeListener();
        String propName = "property name";
        Object oldValue = new Integer(1);
        Object newValue = new Integer(5);

        support.addPropertyChangeListener(propName, l1);
        support.addPropertyChangeListener("xxx", l2);
        l1.clearLastEvent();
        l2.clearLastEvent();
        support.firePropertyChange(propName, oldValue, newValue);
        assertEquals(propName, l1.lastEvent.getPropertyName());
View Full Code Here

        String propName = "property name";
        Object oldValue = new Integer(1);
        Object newValue = new Integer(5);

        support.addPropertyChangeListener(propName, l1);
        support.addPropertyChangeListener("xxx", l2);
        l1.clearLastEvent();
        l2.clearLastEvent();
        support.firePropertyChange(propName, oldValue, newValue);
        assertEquals(propName, l1.lastEvent.getPropertyName());
        assertSame(oldValue, l1.lastEvent.getOldValue());
View Full Code Here

        MockPropertyChangeListener l2 = new MockPropertyChangeListener();
        String propName = "property name";
        Object oldValue = new Integer(1);
        Object newValue = new Integer(1);

        support.addPropertyChangeListener(propName, l1);
        support.addPropertyChangeListener("xxx", l2);
        l1.clearLastEvent();
        l2.clearLastEvent();
        support.firePropertyChange(propName, oldValue, newValue);
        assertNull(l1.lastEvent);
View Full Code Here

        String propName = "property name";
        Object oldValue = new Integer(1);
        Object newValue = new Integer(1);

        support.addPropertyChangeListener(propName, l1);
        support.addPropertyChangeListener("xxx", l2);
        l1.clearLastEvent();
        l2.clearLastEvent();
        support.firePropertyChange(propName, oldValue, newValue);
        assertNull(l1.lastEvent);
        assertNull(l2.lastEvent);
View Full Code Here

        MockPropertyChangeListener l2 = new MockPropertyChangeListener();
        String propName = "property name";
        Object oldValue = null;
        Object newValue = null;

        support.addPropertyChangeListener(propName, l1);
        support.addPropertyChangeListener("xxx", l2);
        l1.clearLastEvent();
        l2.clearLastEvent();
        support.firePropertyChange(propName, oldValue, newValue);
        assertEquals(propName, l1.lastEvent.getPropertyName());
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.