Package org.apache.tapestry.services

Examples of org.apache.tapestry.services.ServletRequestServicer


    public void testNoSuchMethodError() throws Exception
    {
        HttpServletRequest request = newMock(HttpServletRequest.class);

        HttpServletResponse response = newResponse();
        ServletRequestServicer servicer = newServicer();

        Throwable t = new NoSuchMethodError();

        expect(request.getCharacterEncoding()).andReturn(null);

        request.setCharacterEncoding("output-encoding");
        expectLastCall().andThrow(t);

        servicer.service(request, response);

        replay();

        SetupRequestEncoding sre = new SetupRequestEncoding();
        sre.setOutputEncoding("output-encoding");

        sre.service(request, response, servicer);

        verify();

        // Check that, after such an error, we don't even try to do it again.

        servicer.service(request, response);

        replay();

        sre.service(request, response, servicer);
View Full Code Here


    public void testAbstractMethodError() throws Exception
    {
        HttpServletRequest request = newMock(HttpServletRequest.class);

        HttpServletResponse response = newResponse();
        ServletRequestServicer servicer = newServicer();

        Throwable t = new AbstractMethodError();

        expect(request.getCharacterEncoding()).andReturn(null);

        request.setCharacterEncoding("output-encoding");
        expectLastCall().andThrow(t);

        servicer.service(request, response);

        replay();

        SetupRequestEncoding sre = new SetupRequestEncoding();
        sre.setOutputEncoding("output-encoding");

        sre.service(request, response, servicer);

        verify();

        // Check that, after such an error, we don't even try to do it again.

        servicer.service(request, response);

        replay();

        sre.service(request, response, servicer);
View Full Code Here

TOP

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

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.