Package org.apache.tapestry.services

Examples of org.apache.tapestry.services.ServiceMap


public class TestEngineServiceObjectProvider extends HiveMindTestCase
{
    public void testProvideObject()
    {
        MockControl mapControl = newControl(ServiceMap.class);
        ServiceMap map = (ServiceMap) mapControl.getMock();

        IEngineService service = (IEngineService) newMock(IEngineService.class);

        map.getService("page");
        mapControl.setReturnValue(service);

        replayControls();

        EngineServiceObjectProvider p = new EngineServiceObjectProvider();
View Full Code Here


        PageSource pageSource = new PageSource();
       
        expect(infrastructure.getPageSource()).andReturn(pageSource);
       
        IEngineService service = newService();
        ServiceMap map = newServiceMap("fred", service);
       
        expect(infrastructure.getServiceMap()).andReturn(map);
       
        RequestCycleEnvironment env = new RequestCycleEnvironment(newErrorHandler(),
                infrastructure, newStrategySource(), newBuilder());
View Full Code Here

        verify();
    }

    private ServiceMap newServiceMap(String serviceName, IEngineService service)
    {
        ServiceMap map = newMock(ServiceMap.class);
        checkOrder(map, false);
       
        expect(map.getService(serviceName)).andReturn(service);

        return map;
    }
View Full Code Here

    public void testGetters()
    {
        RequestContext context = new RequestContext(null, null);

        IEngineService service = newService();
        ServiceMap map = newServiceMap("fred", service);

        Infrastructure infrastructure = newInfrastructure(newPageSource());

        infrastructure.getServiceMap();
        setReturnValue(infrastructure, map);
View Full Code Here

        verifyControls();
    }

    private ServiceMap newServiceMap(String serviceName, IEngineService service)
    {
        ServiceMap map = (ServiceMap) newMock(ServiceMap.class);

        map.getService(serviceName);
        setReturnValue(map, service);

        return map;
    }
View Full Code Here

@Test
public class TestEngineServiceObjectProvider extends BaseComponentTestCase
{
    public void testProvideObject()
    {
        ServiceMap map = newMock(ServiceMap.class);

        IEngineService service = newMock(IEngineService.class);

        expect(map.getService("page")).andReturn(service);

        replay();

        EngineServiceObjectProvider p = new EngineServiceObjectProvider();
View Full Code Here

    public void testGetters()
    {
        RequestContext context = new RequestContext(null, null);

        IEngineService service = newService();
        ServiceMap map = newServiceMap("fred", service);

        MockControl control = newControl(Infrastructure.class);
        Infrastructure infrastructure = (Infrastructure) control.getMock();

        infrastructure.getPageSource();
View Full Code Here

    }

    private ServiceMap newServiceMap(String serviceName, IEngineService service)
    {
        MockControl control = newControl(ServiceMap.class);
        ServiceMap map = (ServiceMap) control.getMock();

        map.getService(serviceName);
        control.setReturnValue(service);

        return map;
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry.services.ServiceMap

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.