public class RequestMatcherBuilderImpl<ReqT> extends Object implements RequestMatcherBuilderStep<RequestMatcherBuilderImpl<ReqT>,ReqT>, StreamRequestMatcherBuilderStep<RequestMatcherBuilderImpl<ReqT>,ReqT>
| Modifier and Type | Method and Description |
|---|---|
RequestMatcher<ReqT> |
build() |
void |
clearRequestsPredicates() |
RequestMatcherBuilderImpl<ReqT> |
withRequest(Predicate<ReqT> requestPredicate)
Adds a request matcher for the stub, which will trigger only if incoming request
satisfies given
Predicate. |
RequestMatcherBuilderImpl<ReqT> |
withRequests(Predicate<List<ReqT>> requestsPredicate)
Adds a requests' matcher, which checks if all received stream requests satisfies given
Predicate. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwithRequestwithFirstRequest, withFirstRequest, withNumberOfRequests, withRequestAtIndex, withRequestAtIndex, withRequests, withRequests, withRequestsContaining, withRequestsContainingpublic RequestMatcherBuilderImpl<ReqT> withRequest(@Nonnull Predicate<ReqT> requestPredicate)
RequestMatcherBuilderStepAdds a request matcher for the stub, which will trigger only if incoming request
satisfies given Predicate.
Only applicable to unary or server streaming methods.
Subsequent request matchers will replace the old one.
withRequest in interface RequestMatcherBuilderStep<RequestMatcherBuilderImpl<ReqT>,ReqT>public RequestMatcherBuilderImpl<ReqT> withRequests(@Nonnull Predicate<List<ReqT>> requestsPredicate)
StreamRequestMatcherBuilderStepAdds a requests' matcher, which checks if all received stream requests satisfies given Predicate.
Only applicable to client and bidi streaming methods.
Subsequent requests matchers will be added as additional conditions.
withRequests in interface StreamRequestMatcherBuilderStep<RequestMatcherBuilderImpl<ReqT>,ReqT>public void clearRequestsPredicates()
public RequestMatcher<ReqT> build()
Copyright © 2023. All rights reserved.