Package org.apache.wink.server.internal.log.Requests

Examples of org.apache.wink.server.internal.log.Requests.RequestWrapper


        final HandlersChain chain = mockContext.mock(HandlersChain.class);

        final HttpServletRequestWrapper requestWrapper =
            mockContext.mock(HttpServletRequestWrapper.class);
        final Sequence normalSequence = mockContext.sequence("normalSequence");
        final RequestWrapper wrapper = mockContext.mock(RequestWrapper.class);
        final LoggedServletInputStream inputStream =
            mockContext.mock(LoggedServletInputStream.class);
        final UriInfo uriInfo = mockContext.mock(UriInfo.class);
        final HttpHeaders headers = mockContext.mock(HttpHeaders.class);
View Full Code Here


    }

    @Test
    public void testRequestWrapperRandomCall() {
        final HttpServletRequest request = mockContext.mock(HttpServletRequest.class);
        RequestWrapper wrapper = new RequestWrapper(request);

        mockContext.checking(new Expectations() {
            {
                oneOf(request).getContentType();
                will(returnValue("ABCD"));
            }
        });
        assertEquals("ABCD", wrapper.getContentType());

        mockContext.assertIsSatisfied();
    }
View Full Code Here

    @Test
    public void testRequestWrapperGetInputStream() throws Exception {
        final HttpServletRequest request = mockContext.mock(HttpServletRequest.class);
        final ServletInputStream servletInputStream = mockContext.mock(ServletInputStream.class);
        RequestWrapper wrapper = new RequestWrapper(request);

        mockContext.checking(new Expectations() {
            {
                oneOf(request).getInputStream();
                will(returnValue(servletInputStream));
            }
        });
        ServletInputStream m = wrapper.getInputStream();
        assertTrue(m instanceof LoggedServletInputStream);
        assertSame((LoggedServletInputStream)m, wrapper.getLoggedInputStream());

        mockContext.assertIsSatisfied();
    }
View Full Code Here

TOP

Related Classes of org.apache.wink.server.internal.log.Requests.RequestWrapper

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.