use of io.servicecomb.provider.rest.common.ProducerHttpRequestArgMapper in project java-chassis by ServiceComb.
the class TestHttpRequestParamCreator method testCreateMockParam.
@Test
public void testCreateMockParam() throws Exception {
ProducerHttpRequestArgMapper lHttpRequestParamCreator = new ProducerHttpRequestArgMapper(0);
Invocation invocation = Mockito.mock(Invocation.class);
OperationMeta operationMeta = Mockito.mock(OperationMeta.class);
Mockito.when(invocation.getOperationMeta()).thenReturn(operationMeta);
RestOperationMeta swaggerOperation = Mockito.mock(RestOperationMeta.class);
Mockito.when(operationMeta.getExtData(RestConst.SWAGGER_REST_OPERATION)).thenReturn(swaggerOperation);
HttpServletRequest lHttpServletRequest = (HttpServletRequest) lHttpRequestParamCreator.createContextArg(invocation);
Assert.assertNull(lHttpServletRequest.getMethod());
}
Aggregations