Search in sources :

Example 1 with ResteasyHttpHeaders

use of org.jboss.resteasy.specimpl.ResteasyHttpHeaders in project microservice_framework by CJSCommonPlatform.

the class EventPageResourceTest method shouldCheckAccessRights.

@Test
public void shouldCheckAccessRights() throws Exception {
    final String streamId = randomUUID().toString();
    final ResteasyHttpHeaders requestHeaders = new ResteasyHttpHeaders(new MultivaluedHashMap<>());
    resource.headers = requestHeaders;
    resource.events(streamId, "3", FORWARD.toString(), 1, new ResteasyUriInfo("", "", ""));
    verify(accessControlChecker).checkAccessControl(requestHeaders);
}
Also used : ResteasyUriInfo(org.jboss.resteasy.spi.ResteasyUriInfo) ResteasyHttpHeaders(org.jboss.resteasy.specimpl.ResteasyHttpHeaders) Test(org.junit.Test)

Example 2 with ResteasyHttpHeaders

use of org.jboss.resteasy.specimpl.ResteasyHttpHeaders in project microservice_framework by CJSCommonPlatform.

the class DefaultRestProcessorTest method headersWithUserId.

private static ResteasyHttpHeaders headersWithUserId(final String userId) {
    final ResteasyHttpHeaders headers;
    final MultivaluedMapImpl<String, String> requestHeaders = new MultivaluedMapImpl<>();
    requestHeaders.add(HeaderConstants.USER_ID, userId);
    headers = new ResteasyHttpHeaders(requestHeaders);
    return headers;
}
Also used : MultivaluedMapImpl(org.jboss.resteasy.specimpl.MultivaluedMapImpl) Matchers.anyString(org.mockito.Matchers.anyString) ResteasyHttpHeaders(org.jboss.resteasy.specimpl.ResteasyHttpHeaders)

Example 3 with ResteasyHttpHeaders

use of org.jboss.resteasy.specimpl.ResteasyHttpHeaders in project microservice_framework by CJSCommonPlatform.

the class EventStreamPageResourceTest method shouldCheckAccessRights.

@Test
public void shouldCheckAccessRights() throws Exception {
    final ResteasyHttpHeaders requestHeaders = new ResteasyHttpHeaders(new MultivaluedHashMap<>());
    resource.headers = requestHeaders;
    resource.events("3", FORWARD.toString(), PAGE_SIZE, new ResteasyUriInfo("", "", ""));
    verify(accessControlChecker).checkAccessControl(requestHeaders);
}
Also used : ResteasyUriInfo(org.jboss.resteasy.spi.ResteasyUriInfo) ResteasyHttpHeaders(org.jboss.resteasy.specimpl.ResteasyHttpHeaders) Test(org.junit.Test)

Aggregations

ResteasyHttpHeaders (org.jboss.resteasy.specimpl.ResteasyHttpHeaders)3 ResteasyUriInfo (org.jboss.resteasy.spi.ResteasyUriInfo)2 Test (org.junit.Test)2 MultivaluedMapImpl (org.jboss.resteasy.specimpl.MultivaluedMapImpl)1 Matchers.anyString (org.mockito.Matchers.anyString)1