Package org.apache.tapestry.engine

Examples of org.apache.tapestry.engine.ServiceEncoding


        verify();
    }

    public void testDecodeWrongExtension()
    {
        ServiceEncoding sec = newMock(ServiceEncoding.class);

        expect(sec.getServletPath()).andReturn("/foo/bar/baz.direct");

        replay();

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


        verify();
    }
   
    public void testDecode()
    {
        ServiceEncoding sec = newMock(ServiceEncoding.class);

        expect(sec.getServletPath()).andReturn("/hitter.svc");

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

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

@Test
public class TestPageServiceEncoder extends BaseComponentTestCase
{
    public void testEncodeOtherService()
    {
        ServiceEncoding e = newMock(ServiceEncoding.class);

        expect(e.getParameterValue(ServiceConstants.SERVICE)).andReturn("foo");

        replay();

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

        verify();
    }

    public void testEncode()
    {
        ServiceEncoding e = newMock(ServiceEncoding.class);

        expect(e.getParameterValue(ServiceConstants.SERVICE)).andReturn("page");

        expect(e.getParameterValue(ServiceConstants.PAGE)).andReturn("Home");

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

        replay();

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

        verify();
    }

    public void testEncodeHtm()
    {
        ServiceEncoding e = newMock(ServiceEncoding.class);

        expect(e.getParameterValue(ServiceConstants.SERVICE)).andReturn("page");

        expect(e.getParameterValue(ServiceConstants.PAGE)).andReturn("Home");

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

        replay();

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

        verify();
    }
   
    public void testEncodeInNamespace()
    {
        ServiceEncoding e = newMock(ServiceEncoding.class);

        expect(e.getParameterValue(ServiceConstants.SERVICE)).andReturn("page");

        expect(e.getParameterValue(ServiceConstants.PAGE)).andReturn("contrib:Foo");
       
        replay();

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

        verify();
    }

    public void testDecodeNoExtension()
    {
        ServiceEncoding e = newMock(ServiceEncoding.class);

        expect(e.getServletPath()).andReturn("/app");
       
        replay();

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

        verify();
    }

    public void testDecodeEndsWithDot()
    {
        ServiceEncoding e = newMock(ServiceEncoding.class);

        expect(e.getServletPath()).andReturn("/ends.with.dot.");

        replay();

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

        verify();
    }

    public void testDecodeWrongExtension()
    {
        ServiceEncoding e = newMock(ServiceEncoding.class);

        expect(e.getServletPath()).andReturn("/Home.direct");

        replay();

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

        verify();
    }

    public void testDecodeSuccess()
    {
        ServiceEncoding e = newMock(ServiceEncoding.class);

        expect(e.getServletPath()).andReturn("/Home.html");

        e.setParameterValue(ServiceConstants.SERVICE, "page");
        e.setParameterValue(ServiceConstants.PAGE, "Home");

        replay();

        PageServiceEncoder encoder = new PageServiceEncoder();
        encoder.setExtension("html");
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.