Package org.archive.wayback.replay.TransparentReplayRendererTest

Examples of org.archive.wayback.replay.TransparentReplayRendererTest.TestServletOutputStream


   
    // ResultURIConverter argument is passed down from AccessPoint#getUriConverter().
    // it is typically ProxyHttpsResultURIConverter(), the same class for converterFactory
    // (but a separate instance) - we reuse proxyURIConverter above.
    HttpServletResponse response = EasyMock.createNiceMock(HttpServletResponse.class);
    TestServletOutputStream servletOutput = new TestServletOutputStream();
    EasyMock.expect(response.getOutputStream()).andStubReturn(servletOutput);
   
    HttpServletRequest request = null; // assuming unused
    WaybackRequest wbRequest = new WaybackRequest();
    CaptureSearchResult result = new CaptureSearchResult();
    result.setOriginalUrl("http://home.archive.org/~hstern/ARI-3745/");
   
    EasyMock.replay(response);
   
    renderer.renderResource(request, response, wbRequest, result, payloadResource, payloadResource, proxyURIConverter, null);
   
    String out = servletOutput.getString();
    assertEquals("servlet output", expected, out);
  }
View Full Code Here

TOP

Related Classes of org.archive.wayback.replay.TransparentReplayRendererTest.TestServletOutputStream

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.