Examples of IEngineService


Examples of org.apache.tapestry.engine.IEngineService

    public void testGetNoConflict() throws Exception
    {
        IRequestCycle cycle1 = newCycle();
        IRequestCycle cycle2 = newCycle();

        IEngineService factory = newService("factory");
        IEngineService application = newService("application");

        EngineServiceContribution factoryc = constructService("factory", factory);
        EngineServiceContribution applicationc = constructService("application", application);

        factory.service(cycle1);
        application.service(cycle2);

        replayControls();

        ServiceMapImpl m = new ServiceMapImpl();
View Full Code Here

Examples of org.apache.tapestry.engine.IEngineService

    public void testNameMismatch() throws Exception
    {
        IRequestCycle cycle = newCycle();
        Location l = fabricateLocation(1289);

        IEngineService service = newService("actual-name");

        EngineServiceContribution contribution = constructService("expected-name", service);
        contribution.setLocation(l);

        replayControls();

        ServiceMapImpl m = new ServiceMapImpl();

        m.setFactoryServices(Collections.singletonList(contribution));
        m.setApplicationServices(Collections.EMPTY_LIST);

        m.initializeService();

        IEngineService proxy = m.getService("expected-name");

        try
        {
            proxy.service(cycle);
            unreachable();
        }
        catch (ApplicationRuntimeException ex)
        {
            assertEquals(
View Full Code Here

Examples of org.apache.tapestry.engine.IEngineService

        verifyControls();
    }

    public void testGetServiceRepeated()
    {
        IEngineService application = newService();
        EngineServiceContribution applicationc = constructService("application", application);

        replayControls();

        ServiceMapImpl m = new ServiceMapImpl();

        m.setFactoryServices(Collections.EMPTY_LIST);
        m.setApplicationServices(Collections.singletonList(applicationc));

        m.initializeService();

        IEngineService service = m.getService("application");
        assertSame(service, m.getService("application"));

        verifyControls();
    }
View Full Code Here

Examples of org.apache.tapestry.engine.IEngineService

    }

    public void testApplicationOverridesFactory() throws Exception
    {
        IRequestCycle cycle = newCycle();
        IEngineService factory = newService();
        IEngineService application = newService("override");

        EngineServiceContribution factoryc = constructService("override", factory);
        EngineServiceContribution applicationc = constructService("override", application);

        application.service(cycle);

        replayControls();

        ServiceMapImpl m = new ServiceMapImpl();
View Full Code Here

Examples of org.apache.tapestry.engine.IEngineService

    public void testDuplicateName() throws Exception
    {
        Location l = fabricateLocation(37);
        IRequestCycle cycle = newCycle();

        IEngineService first = newService("duplicate");
        IEngineService second = newService();

        EngineServiceContribution firstc = constructService("duplicate", first);
        firstc.setLocation(l);

        EngineServiceContribution secondc = constructService("duplicate", second);
View Full Code Here

Examples of org.apache.tapestry.engine.IEngineService

    {
        ILink link = newLink();
        IRequestCycle cycle = newCycle();

        MockControl control = newControl(IEngineService.class);
        IEngineService service = (IEngineService) control.getMock();

        Object parameter = new Object();

        service.getLink(cycle, parameter);
        control.setReturnValue(link);

        EngineServiceSource source = newSource("fred", service);

        replayControls();
View Full Code Here

Examples of org.apache.tapestry.engine.IEngineService

    }

    public void testService() throws Exception
    {
        IRequestCycle cycle = newCycle();
        IEngineService service = (IEngineService) newMock(IEngineService.class);

        service.service(cycle);

        EngineServiceSource source = newSource("fred", service);

        replayControls();
View Full Code Here

Examples of org.apache.tapestry.engine.IEngineService

*/
public class TestEngineServiceOuterProxy extends HiveMindTestCase
{
    public void testToString()
    {
        IEngineService s = new EngineServiceOuterProxy("fred");

        assertEquals("<OuterProxy for engine service 'fred'>", s.toString());
    }
View Full Code Here

Examples of org.apache.tapestry.engine.IEngineService

    {
        IRequestCycle cycle = newCycle();
        ILink link = (ILink) newMock(ILink.class);

        MockControl control = newControl(IEngineService.class);
        IEngineService delegate = (IEngineService) control.getMock();

        Object parameter = new Object();

        delegate.getLink(cycle, parameter);
        control.setReturnValue(link);

        replayControls();

        EngineServiceOuterProxy proxy = new EngineServiceOuterProxy("xxx");
View Full Code Here

Examples of org.apache.tapestry.engine.IEngineService

    }

    public void testService() throws Exception
    {
        IRequestCycle cycle = newCycle();
        IEngineService delegate = (IEngineService) newMock(IEngineService.class);

        delegate.service(cycle);

        replayControls();

        EngineServiceOuterProxy proxy = new EngineServiceOuterProxy("xxx");
        proxy.installDelegate(delegate);
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.