use of com.enonic.xp.web.impl.serializer.ResponseSerializationServiceImpl in project xp by enonic.
the class WebDispatcherServletTest method configure.
@Override
protected void configure() throws Exception {
this.handler = new TestWebHandler();
this.servlet = new WebDispatcherServlet(new WebDispatcherImpl());
this.servlet.addWebHandler(this.handler);
this.servlet.setExceptionMapper(new ExceptionMapperImpl());
this.servlet.setExceptionRenderer((req, cause) -> WebResponse.create().status(HttpStatus.NOT_FOUND).build());
this.servlet.setWebSocketContextFactory(Mockito.mock(WebSocketContextFactory.class));
this.servlet.setResponseSerializationService(new ResponseSerializationServiceImpl());
this.handler.response = WebResponse.create().status(HttpStatus.OK).build();
addServlet(this.servlet, "/site/*");
}
Aggregations