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

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


                services, BeanContext.class);
        assertSame(BeanContext.class, event.getServiceClass());
    }

    public void testGetCurrentServiceSelectors() {
        BeanContextServices services = new MockBeanContextServices();
        BeanContextServiceAvailableEvent event = new MockBeanContextServiceAvailableEvent(
                services, BeanContext.class);

        Iterator expectedIt = services
                .getCurrentServiceSelectors(BeanContext.class);
        Iterator it = event.getCurrentServiceSelectors();
        while (expectedIt.hasNext()) {
            assertSame(expectedIt.next(), it.next());
        }
View Full Code Here


        assertFalse(it.hasNext());
    }

    public void testSerialization() throws IOException, ClassNotFoundException {
        BeanContextServiceAvailableEvent event = new BeanContextServiceAvailableEvent(
                new MockBeanContextServices(), ArrayList.class);
        event.setPropagatedFrom(new MockBeanContextDelegateS("from ID"));

        assertEqualsSerially(event,
                (BeanContextServiceAvailableEvent) SerializationTester
                        .getDeserilizedObject(event));
View Full Code Here

    }


     public void testSerialization_Compatibility() throws Exception {
         BeanContextServiceAvailableEvent event = new BeanContextServiceAvailableEvent(
                 new MockBeanContextServices(), ArrayList.class);
         event.setPropagatedFrom(new MockBeanContextDelegateS("from ID"));
         SerializationTest.verifyGolden(this, event, new SerializableAssert(){
             public void assertDeserialized(Serializable orig, Serializable ser) {
                 assertEqualsSerially((BeanContextServiceAvailableEvent) orig,
                         (BeanContextServiceAvailableEvent) ser);
View Full Code Here

TOP

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

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.