Package org.mortbay.http

Examples of org.mortbay.http.HttpResponse.sendError()


public class ProxyHanderUnitTest extends TestCase {

  public void testSendNotFoundSends404ResponseCode() throws Exception {
    ProxyHandler proxyHandler = new ProxyHandler(true, "", "", false, false);
    HttpResponse httpResponseMock = createMock(HttpResponse.class);
    httpResponseMock.sendError(HttpResponse.__404_Not_Found, "Not found");
    expectLastCall().once();
    replay(httpResponseMock);
    proxyHandler.sendNotFound(httpResponseMock);
    verify(httpResponseMock);
  }
View Full Code Here


public class ProxyHanderUnitTest extends TestCase {

  public void testSendNotFoundSends404ResponseCode() throws Exception {
    ProxyHandler proxyHandler = new ProxyHandler(true, "", "");
    HttpResponse httpResponseMock = createMock(HttpResponse.class);
    httpResponseMock.sendError(HttpResponse.__404_Not_Found, "Not found");
    expectLastCall().once();
    replay(httpResponseMock);
    proxyHandler.sendNotFound(httpResponseMock);
    verify(httpResponseMock);
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.