Package org.apache.tapestry.engine

Examples of org.apache.tapestry.engine.ServiceEncoding


        verifyControls();
    }

    public void testDecodeWrongExtension()
    {
        ServiceEncoding encoding = newEncoding("/foo.svc");

        replayControls();

        DirectServiceEncoder encoder = new DirectServiceEncoder();
        encoder.setStatelessExtension("direct");
View Full Code Here


        verifyControls();
    }

    public void testDecodeStateless()
    {
        ServiceEncoding encoding = newEncoding("/admin/Menu,border.link.direct");

        encoding.setParameterValue(ServiceConstants.SERVICE, Tapestry.DIRECT_SERVICE);
        encoding.setParameterValue(ServiceConstants.PAGE, "admin/Menu");
        encoding.setParameterValue(ServiceConstants.SESSION, null);
        encoding.setParameterValue(ServiceConstants.COMPONENT, "border.link");

        replayControls();

        DirectServiceEncoder encoder = new DirectServiceEncoder();
        encoder.setStatelessExtension("direct");
View Full Code Here

        verifyControls();
    }
   
    public void testDecodeStateful()
    {
        ServiceEncoding encoding = newEncoding("/admin/Menu,border.link.sdirect");

        encoding.setParameterValue(ServiceConstants.SERVICE, Tapestry.DIRECT_SERVICE);
        encoding.setParameterValue(ServiceConstants.PAGE, "admin/Menu");
        encoding.setParameterValue(ServiceConstants.SESSION, "T");
        encoding.setParameterValue(ServiceConstants.COMPONENT, "border.link");

        replayControls();

        DirectServiceEncoder encoder = new DirectServiceEncoder();
        encoder.setStatelessExtension("direct");
View Full Code Here

public class TestServiceExtensionEncoder extends HiveMindTestCase
{
    public void testEncode()
    {
        MockControl c = newControl(ServiceEncoding.class);
        ServiceEncoding sec = (ServiceEncoding) c.getMock();

        sec.getParameterValue(ServiceConstants.SERVICE);
        c.setReturnValue("heavy");

        sec.setServletPath("/heavy.svc");
        sec.setParameterValue(ServiceConstants.SERVICE, null);

        replayControls();

        ServiceExtensionEncoder e = new ServiceExtensionEncoder();
        e.setExtension("svc");
View Full Code Here

    }

    public void testDecodeWrongExtension()
    {
        MockControl c = newControl(ServiceEncoding.class);
        ServiceEncoding sec = (ServiceEncoding) c.getMock();

        sec.getServletPath();
        c.setReturnValue("/foo/bar/baz.direct");

        replayControls();

        ServiceExtensionEncoder e = new ServiceExtensionEncoder();
View Full Code Here

    }
   
    public void testDecode()
    {
        MockControl c = newControl(ServiceEncoding.class);
        ServiceEncoding sec = (ServiceEncoding) c.getMock();

        sec.getServletPath();
        c.setReturnValue("/hitter.svc");

        sec.setParameterValue(ServiceConstants.SERVICE, "hitter");
       
        replayControls();

        ServiceExtensionEncoder e = new ServiceExtensionEncoder();
        e.setExtension("svc");
View Full Code Here

public class TestPageServiceEncoder extends HiveMindTestCase
{
    public void testEncodeOtherService()
    {
        MockControl control = newControl(ServiceEncoding.class);
        ServiceEncoding e = (ServiceEncoding) control.getMock();

        e.getParameterValue(ServiceConstants.SERVICE);
        control.setReturnValue("foo");

        replayControls();

        PageServiceEncoder encoder = new PageServiceEncoder();
View Full Code Here

    }

    public void testEncode()
    {
        MockControl control = newControl(ServiceEncoding.class);
        ServiceEncoding e = (ServiceEncoding) control.getMock();

        e.getParameterValue(ServiceConstants.SERVICE);
        control.setReturnValue("page");

        e.getParameterValue(ServiceConstants.PAGE);
        control.setReturnValue("Home");

        e.setServletPath("/Home.html");
        e.setParameterValue(ServiceConstants.SERVICE, null);
        e.setParameterValue(ServiceConstants.PAGE, null);

        replayControls();

        PageServiceEncoder encoder = new PageServiceEncoder();
        encoder.setServiceName("page");
View Full Code Here

    }

    public void testEncodeInNamespace()
    {
        MockControl control = newControl(ServiceEncoding.class);
        ServiceEncoding e = (ServiceEncoding) control.getMock();

        e.getParameterValue(ServiceConstants.SERVICE);
        control.setReturnValue("page");

        e.getParameterValue(ServiceConstants.PAGE);
        control.setReturnValue("contrib:Foo");

        replayControls();

        PageServiceEncoder encoder = new PageServiceEncoder();
View Full Code Here

    }

    public void testDecodeNoExtension()
    {
        MockControl control = newControl(ServiceEncoding.class);
        ServiceEncoding e = (ServiceEncoding) control.getMock();

        e.getServletPath();
        control.setReturnValue("/app");

        replayControls();

        PageServiceEncoder encoder = new PageServiceEncoder();
View Full Code Here

TOP

Related Classes of org.apache.tapestry.engine.ServiceEncoding

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.