| Modifier and Type | Method and Description |
|---|---|
static ExceptionResponseActionBuilder |
GrpcMock.exception(Throwable exception)
Returns a response action, which will send out
the given exception via
StreamObserver.onError(java.lang.Throwable). |
static ExceptionResponseActionBuilder |
GrpcMock.statusException(io.grpc.Status status)
Returns a response action, which will send out a
StatusRuntimeException
with given Status via StreamObserver.onError(java.lang.Throwable). |
| Modifier and Type | Method and Description |
|---|---|
static <RespT> ExceptionStreamResponseBuildersStep<RespT> |
GrpcMock.stream(ExceptionResponseActionBuilder responseAction)
Returns a terminating stream response, which will respond with
ResponseAction and
terminate the call, since it will be StreamObserver.onError(java.lang.Throwable) response. |
| Modifier and Type | Class and Description |
|---|---|
class |
ExceptionResponseActionBuilderImpl |
| Modifier and Type | Method and Description |
|---|---|
ExceptionResponseActionBuilder |
ExceptionResponseActionBuilderImpl.withDelay(Delay delay) |
| Modifier and Type | Method and Description |
|---|---|
ExceptionStreamResponseBuildersStep<RespT> |
StreamResponseBuilderImpl.and(ExceptionResponseActionBuilder responseAction) |
| Modifier and Type | Method and Description |
|---|---|
ExceptionStreamResponseBuildersStep<RespT> |
ObjectStreamResponseBuilderStep.and(ExceptionResponseActionBuilder responseAction)
Defines a exception
ResponseAction for the stream response. |
| Modifier and Type | Method and Description |
|---|---|
NextUnaryMethodResponseBuilderStep<ReqT,RespT> |
UnaryMethodStubBuilderImpl.nextWillReturn(ExceptionResponseActionBuilder response) |
NextClientStreamingMethodResponseBuilderStep<ReqT,RespT> |
ClientStreamingMethodStubBuilderImpl.nextWillReturn(ExceptionResponseActionBuilder response) |
NextServerStreamingMethodResponseBuilderStep<ReqT,RespT> |
ServerStreamingMethodStubBuilderImpl.nextWillReturn(ExceptionResponseActionBuilder response) |
NextUnaryMethodResponseBuilderStep<ReqT,RespT> |
UnaryMethodStubBuilderImpl.willReturn(ExceptionResponseActionBuilder response) |
NextClientStreamingMethodResponseBuilderStep<ReqT,RespT> |
ClientStreamingMethodStubBuilderImpl.willReturn(ExceptionResponseActionBuilder response) |
NextServerStreamingMethodResponseBuilderStep<ReqT,RespT> |
ServerStreamingMethodStubBuilderImpl.willReturn(ExceptionResponseActionBuilder response) |
| Modifier and Type | Method and Description |
|---|---|
BUILDER |
NextSingleResponseBuilderStep.nextWillReturn(ExceptionResponseActionBuilder response)
Defines a exception
Response for subsequent request call to this stub. |
BUILDER |
SingleResponseBuilderStep.willReturn(ExceptionResponseActionBuilder response)
Defines a exception
Response that will terminate the request. |
Copyright © 2023. All rights reserved.