Search in sources :

Example 1 with RequestInfoImpl

use of com.nike.riposte.server.http.impl.RequestInfoImpl in project riposte by Nike-Inc.

the class BackstopperRiposteFrameworkErrorHandlerListenerTest method shouldHandleRequestContentDeserializationException.

@Test
public void shouldHandleRequestContentDeserializationException() {
    RequestInfo requestInfo = new RequestInfoImpl(null, HttpMethod.PATCH, null, null, null, null, null, null, null, false, true, false);
    verifyExceptionHandled(new RequestContentDeserializationException("intentional boom", null, requestInfo, new TypeReference<Object>() {
    }), singletonError(testProjectApiErrors.getMalformedRequestApiError()));
}
Also used : RequestContentDeserializationException(com.nike.riposte.server.error.exception.RequestContentDeserializationException) RequestInfoImpl(com.nike.riposte.server.http.impl.RequestInfoImpl) TypeReference(com.fasterxml.jackson.core.type.TypeReference) RequestInfo(com.nike.riposte.server.http.RequestInfo) Test(org.junit.Test)

Aggregations

TypeReference (com.fasterxml.jackson.core.type.TypeReference)1 RequestContentDeserializationException (com.nike.riposte.server.error.exception.RequestContentDeserializationException)1 RequestInfo (com.nike.riposte.server.http.RequestInfo)1 RequestInfoImpl (com.nike.riposte.server.http.impl.RequestInfoImpl)1 Test (org.junit.Test)1