use of org.apache.servicecomb.core.event.ServerAccessLogEvent in project java-chassis by ServiceComb.
the class RequestProtocolItemTest method initStrBuilder.
@Before
public void initStrBuilder() {
routingContext = Mockito.mock(RoutingContext.class);
finishEvent = Mockito.mock(InvocationFinishEvent.class);
invocation = Mockito.mock(Invocation.class);
serverRequest = Mockito.mock(HttpServerRequest.class);
urlEndpoint = Mockito.mock(URIEndpointObject.class);
endpoint = Mockito.mock(Endpoint.class);
accessLogEvent = new ServerAccessLogEvent();
accessLogEvent.setRoutingContext(routingContext);
strBuilder = new StringBuilder();
}
use of org.apache.servicecomb.core.event.ServerAccessLogEvent in project java-chassis by ServiceComb.
the class VertxRestAccessLogPatternParserTest method initStrBuilder.
@Before
public void initStrBuilder() {
routingContext = Mockito.mock(RoutingContext.class);
accessLogEvent = new ServerAccessLogEvent();
accessLogEvent.setRoutingContext(routingContext);
}
use of org.apache.servicecomb.core.event.ServerAccessLogEvent in project java-chassis by ServiceComb.
the class LocalPortItemTest method initStrBuilder.
@Before
public void initStrBuilder() {
accessLogEvent = new ServerAccessLogEvent();
routingContext = Mockito.mock(RoutingContext.class);
finishEvent = Mockito.mock(InvocationFinishEvent.class);
serverRequest = Mockito.mock(HttpServerRequest.class);
socketAddress = Mockito.mock(SocketAddress.class);
invocation = Mockito.mock(Invocation.class);
restClientRequest = Mockito.mock(RestClientRequestImpl.class);
clientRequest = Mockito.mock(HttpClientRequest.class);
connection = Mockito.mock(HttpConnection.class);
Map<String, Object> handlerMap = new HashMap<>();
handlerMap.put(RestConst.INVOCATION_HANDLER_REQUESTCLIENT, restClientRequest);
when(finishEvent.getInvocation()).thenReturn(invocation);
when(invocation.getHandlerContext()).thenReturn(handlerMap);
accessLogEvent.setRoutingContext(routingContext);
strBuilder = new StringBuilder();
}
use of org.apache.servicecomb.core.event.ServerAccessLogEvent in project java-chassis by ServiceComb.
the class RequestHeaderItemTest method initStrBuilder.
@Before
public void initStrBuilder() {
routingContext = Mockito.mock(RoutingContext.class);
finishEvent = Mockito.mock(InvocationFinishEvent.class);
invocation = Mockito.mock(Invocation.class);
serverRequest = Mockito.mock(HttpServerRequest.class);
restClientRequest = Mockito.mock(RestClientRequestImpl.class);
clientRequest = Mockito.mock(HttpClientRequest.class);
headers = Mockito.mock(MultiMap.class);
accessLogEvent = new ServerAccessLogEvent();
accessLogEvent.setRoutingContext(routingContext);
strBuilder = new StringBuilder();
}
use of org.apache.servicecomb.core.event.ServerAccessLogEvent in project java-chassis by ServiceComb.
the class UrlPathItemTest method initStrBuilder.
@Before
public void initStrBuilder() {
accessLogEvent = new ServerAccessLogEvent();
routingContext = Mockito.mock(RoutingContext.class);
finishEvent = Mockito.mock(InvocationFinishEvent.class);
invocation = Mockito.mock(Invocation.class);
serverRequest = Mockito.mock(HttpServerRequest.class);
operationMeta = Mockito.mock(OperationMeta.class);
schemaMeta = Mockito.mock(SchemaMeta.class);
swagger = Mockito.mock(Swagger.class);
restClientRequest = Mockito.mock(RestClientRequestImpl.class);
clientRequest = Mockito.mock(HttpClientRequest.class);
accessLogEvent.setRoutingContext(routingContext);
strBuilder = new StringBuilder();
}
Aggregations