Search in sources :

Example 6 with HttpCarbonMessage

use of org.wso2.transport.http.netty.message.HttpCarbonMessage in project carbon-apimgt by wso2.

the class LabelsApiServiceImplTestCase method getRequest.

// Sample request to be used by tests
private Request getRequest() throws Exception {
    HTTPCarbonMessage carbonMessage = Mockito.mock(HTTPCarbonMessage.class);
    Mockito.when(carbonMessage.getProperty("LOGGED_IN_USER")).thenReturn(USER);
    Request request = new Request(carbonMessage);
    return request;
}
Also used : HTTPCarbonMessage(org.wso2.transport.http.netty.message.HTTPCarbonMessage) Request(org.wso2.msf4j.Request)

Example 7 with HttpCarbonMessage

use of org.wso2.transport.http.netty.message.HttpCarbonMessage in project carbon-apimgt by wso2.

the class EndpointsApiServiceImplTestCase method getRequest.

// Sample request to be used by tests
private Request getRequest() throws Exception {
    HTTPCarbonMessage carbonMessage = Mockito.mock(HTTPCarbonMessage.class);
    Mockito.when(carbonMessage.getProperty("LOGGED_IN_USER")).thenReturn(USER);
    Request request = new Request(carbonMessage);
    return request;
}
Also used : HTTPCarbonMessage(org.wso2.transport.http.netty.message.HTTPCarbonMessage) Request(org.wso2.msf4j.Request)

Example 8 with HttpCarbonMessage

use of org.wso2.transport.http.netty.message.HttpCarbonMessage in project carbon-apimgt by wso2.

the class PoliciesApiServiceImplTestCase method getRequest.

// Sample request to be used by tests
private Request getRequest() throws Exception {
    HTTPCarbonMessage carbonMessage = Mockito.mock(HTTPCarbonMessage.class);
    Mockito.when(carbonMessage.getProperty("LOGGED_IN_USER")).thenReturn(USER);
    Request request = new Request(carbonMessage);
    return request;
}
Also used : HTTPCarbonMessage(org.wso2.transport.http.netty.message.HTTPCarbonMessage) Request(org.wso2.msf4j.Request)

Example 9 with HttpCarbonMessage

use of org.wso2.transport.http.netty.message.HttpCarbonMessage in project carbon-apimgt by wso2.

the class ApisApiServiceImplTestCase method getRequest.

// Sample request to be used by tests
private Request getRequest() throws Exception {
    HTTPCarbonMessage carbonMessage = Mockito.mock(HTTPCarbonMessage.class);
    Mockito.when(carbonMessage.getProperty("LOGGED_IN_USER")).thenReturn(USER);
    Request request = new Request(carbonMessage);
    return request;
}
Also used : HTTPCarbonMessage(org.wso2.transport.http.netty.message.HTTPCarbonMessage) Request(org.wso2.msf4j.Request)

Example 10 with HttpCarbonMessage

use of org.wso2.transport.http.netty.message.HttpCarbonMessage in project carbon-apimgt by wso2.

the class EndpointsApiServiceImplTestCase method getRequest.

private Request getRequest() throws Exception {
    HTTPCarbonMessage carbonMessage = Mockito.mock(HTTPCarbonMessage.class);
    Request request = new Request(carbonMessage);
    PowerMockito.whenNew(Request.class).withArguments(carbonMessage).thenReturn(request);
    return request;
}
Also used : HTTPCarbonMessage(org.wso2.transport.http.netty.message.HTTPCarbonMessage) Request(org.wso2.msf4j.Request)

Aggregations

Request (org.wso2.msf4j.Request)34 HTTPCarbonMessage (org.wso2.transport.http.netty.message.HTTPCarbonMessage)34 APIMgtSecurityException (org.wso2.carbon.apimgt.rest.api.common.exception.APIMgtSecurityException)5 APIManagementException (org.wso2.carbon.apimgt.core.exception.APIManagementException)4 Response (org.wso2.msf4j.Response)3 ServiceMethodInfo (org.wso2.msf4j.ServiceMethodInfo)3 Test (org.junit.Test)2 NotFoundException (org.wso2.carbon.apimgt.rest.api.admin.NotFoundException)2 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)1 Test (org.testng.annotations.Test)1 IdentityProvider (org.wso2.carbon.apimgt.core.api.IdentityProvider)1 APIMgtDAOException (org.wso2.carbon.apimgt.core.exception.APIMgtDAOException)1 APIManagerFactory (org.wso2.carbon.apimgt.core.impl.APIManagerFactory)1 AccessTokenInfo (org.wso2.carbon.apimgt.core.models.AccessTokenInfo)1 UnsupportedThrottleLimitTypeException (org.wso2.carbon.apimgt.rest.api.admin.exceptions.UnsupportedThrottleLimitTypeException)1 BasicAuthAuthenticator (org.wso2.carbon.apimgt.rest.api.common.impl.BasicAuthAuthenticator)1 OAuth2Authenticator (org.wso2.carbon.apimgt.rest.api.common.impl.OAuth2Authenticator)1 RESTAPISecurityInterceptor (org.wso2.carbon.apimgt.rest.api.common.interceptors.RESTAPISecurityInterceptor)1