use of com.zimbra.cs.service.MockHttpServletResponse in project zm-mailbox by Zimbra.
the class ZimbraServletTest method proxyTest.
@Ignore("until bug 60345 is fixed")
@Test
public void proxyTest() throws Exception {
MockHttpServletRequest req = new MockHttpServletRequest("test".getBytes("UTF-8"), new URL("http://localhost:7070/user1" + uri), "");
MockHttpServletResponse resp = new MockHttpServletResponse();
ZimbraServlet.proxyServletRequest(req, resp, Provisioning.getInstance().getLocalServer(), uri, null);
}
use of com.zimbra.cs.service.MockHttpServletResponse in project zm-mailbox by Zimbra.
the class ServiceTestUtil method getRequestContext.
public static Map<String, Object> getRequestContext(Account authAcct, Account targetAcct, DocumentService service) throws Exception {
Map<String, Object> context = new HashMap<String, Object>();
context.put(SoapEngine.ZIMBRA_CONTEXT, new ZimbraSoapContext(AuthProvider.getAuthToken(authAcct), targetAcct.getId(), SoapProtocol.Soap12, SoapProtocol.Soap12));
context.put(SoapServlet.SERVLET_REQUEST, new MockHttpServletRequest("test".getBytes("UTF-8"), new URL("http://localhost:7070/service/FooRequest"), ""));
context.put(SoapEngine.ZIMBRA_ENGINE, new MockSoapEngine(service));
context.put(SoapServlet.SERVLET_RESPONSE, new MockHttpServletResponse());
return context;
}
Aggregations