Search in sources :

Example 1 with ContentTypeHelper

use of org.keycloak.protocol.cas.utils.ContentTypeHelper in project keycloak-protocol-cas by jacekkow.

the class ContentTypeHelperTest method get.

private ContentTypeHelper get(String uri, String acceptHeader) throws Exception {
    MockHttpRequest req = MockHttpRequest.get(uri);
    MockHttpResponse res = new MockHttpResponse();
    RequestImpl restReq = new RequestImpl(req, res);
    if (acceptHeader != null) {
        req = req.header(HttpHeaders.ACCEPT, acceptHeader);
    }
    return new ContentTypeHelper(req, restReq, req.getUri());
}
Also used : MockHttpRequest(org.jboss.resteasy.mock.MockHttpRequest) ContentTypeHelper(org.keycloak.protocol.cas.utils.ContentTypeHelper) RequestImpl(org.jboss.resteasy.specimpl.RequestImpl) MockHttpResponse(org.jboss.resteasy.mock.MockHttpResponse)

Aggregations

MockHttpRequest (org.jboss.resteasy.mock.MockHttpRequest)1 MockHttpResponse (org.jboss.resteasy.mock.MockHttpResponse)1 RequestImpl (org.jboss.resteasy.specimpl.RequestImpl)1 ContentTypeHelper (org.keycloak.protocol.cas.utils.ContentTypeHelper)1