Package org.apache.harmony.beans.tests.support.beancontext.mock

Examples of org.apache.harmony.beans.tests.support.beancontext.mock.MockPropertyChangeListener


        // covered by testBcsPreSerializationHook
    }

    public void testSetDesignTime() {
        MockBeanContextSupport support = new MockBeanContextSupport();
        MockPropertyChangeListener l1 = new MockPropertyChangeListener();
        MockVetoableChangeListener l2 = new MockVetoableChangeListener();
        support.addPropertyChangeListener("designTime", l1);
        support.addVetoableChangeListener("designTime", l2);
        assertFalse(support.isDesignTime());
        support.records.assertRecord("initialize", null);
View Full Code Here


        support.records.assertEndOfRecords();
    }

    public void testSetLocale() throws PropertyVetoException {
        MockBeanContextSupport support = new MockBeanContextSupport();
        MockPropertyChangeListener l1 = new MockPropertyChangeListener();
        MockVetoableChangeListener l2 = new MockVetoableChangeListener();
        support.addPropertyChangeListener("locale", l1);
        support.addVetoableChangeListener("locale", l2);
        assertSame(Locale.getDefault(), support.getLocale());
        support.records.assertRecord("initialize", null);
View Full Code Here

        assertEquals(Locale.ITALY, l2.lastEvent.getNewValue());
    }

    public void testSetLocale_Veto() {
        MockBeanContextSupport support = new MockBeanContextSupport();
        MockPropertyChangeListener l1 = new MockPropertyChangeListener();
        MockVetoChangeListener l2 = new MockVetoChangeListener();
        support.addPropertyChangeListener("locale", l1);
        support.addVetoableChangeListener("locale", l2);
        assertSame(Locale.getDefault(), support.getLocale());
        support.records.assertRecord("initialize", null);
View Full Code Here

TOP

Related Classes of org.apache.harmony.beans.tests.support.beancontext.mock.MockPropertyChangeListener

Copyright © 2018 www.massapicom. 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.