Package org.apache.tapestry5.ioc

Examples of org.apache.tapestry5.ioc.ObjectCreator


    private static final String SERVICE_ID = "FooBar";

    @Test
    public void create_after_shutdown()
    {
        ObjectCreator creator = mockObjectCreator();

        replay();

        JustInTimeObjectCreator j = new JustInTimeObjectCreator(null, creator, SERVICE_ID);
View Full Code Here


    }

    @Test
    public void eager_load()
    {
        ObjectCreator creator = mockObjectCreator();
        Object service = new Object();
        ServiceActivityTracker tracker = mockServiceActivityTracker();

        replay();
View Full Code Here

        ignoreDebug(logger);

        replay();

        ObjectCreator sc = new ServiceBuilderMethodInvoker(resources, CREATOR_DESCRIPTION, findMethod(fixture,
                "build_noargs"));

        Object actual = sc.createObject();

        assertSame(actual, fixture.fie);

        verify();
    }
View Full Code Here

        ignoreDebug(logger);

        replay();

        ObjectCreator sc = new ServiceBuilderMethodInvoker(resources, CREATOR_DESCRIPTION, method);

        Object actual = sc.createObject();

        assertSame(actual, fixture.fie);

        verify();
    }
View Full Code Here

        expect(resources.getObject(eq(String.class), isA(AnnotationProvider.class))).andReturn("Injected");

        replay();

        ObjectCreator sc = new ServiceBuilderMethodInvoker(resources, CREATOR_DESCRIPTION, method);

        Object actual = sc.createObject();

        assertSame(actual, fixture.fie);

        verify();
    }
View Full Code Here

        ignoreDebug(logger);

        replay();

        ObjectCreator sc = new ServiceBuilderMethodInvoker(resources, CREATOR_DESCRIPTION, findMethod(fixture,
                "build_injected"));

        Object actual = sc.createObject();

        assertSame(actual, fixture.fie);

        verify();
    }
View Full Code Here

        ignoreDebug(logger);

        replay();

        ObjectCreator sc = new ServiceBuilderMethodInvoker(resources, CREATOR_DESCRIPTION, findMethod(fixture,
                "build_named_injected"));

        Object actual = sc.createObject();

        assertSame(actual, fixture.fie);

        verify();
    }
View Full Code Here

        ignoreDebug(logger);

        replay();

        ObjectCreator sc = new ServiceBuilderMethodInvoker(resources, CREATOR_DESCRIPTION, findMethod(fixture,
                "buildWithOrderedConfiguration"));

        Object actual = sc.createObject();

        assertSame(actual, fixture.fie);

        verify();
    }
View Full Code Here

        ignoreDebug(logger);

        replay();

        ObjectCreator sc = new ServiceBuilderMethodInvoker(resources, CREATOR_DESCRIPTION, findMethod(fixture,
                "buildWithUnorderedConfiguration"));

        Object actual = sc.createObject();

        assertSame(actual, fixture.fie);

        verify();
    }
View Full Code Here

        ignoreDebug(logger);

        replay();

        ObjectCreator sc = new ServiceBuilderMethodInvoker(resources, CREATOR_DESCRIPTION, method);

        try
        {
            sc.createObject();
            unreachable();
        } catch (RuntimeException ex)
        {
            Assert.assertEquals(ex.getMessage(), "Builder method " + CREATOR_DESCRIPTION
                    + " (for service 'Fie') returned null.");
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.ioc.ObjectCreator

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.