Interface RequestMatcherBuilderStep<BUILDER extends RequestMatcherBuilderStep<BUILDER,ReqT>,ReqT>

All Superinterfaces:
BuilderStep
All Known Subinterfaces:
RequestPatternBuilderStep<ReqT>, ServerStreamingMethodStubBuilderStep<ReqT,RespT>, UnaryMethodStubBuilderStep<ReqT,RespT>
All Known Implementing Classes:
RequestMatcherBuilderImpl, RequestPatternBuilderImpl, ServerStreamingMethodStubBuilderImpl, UnaryMethodStubBuilderImpl

public interface RequestMatcherBuilderStep<BUILDER extends RequestMatcherBuilderStep<BUILDER,ReqT>,ReqT> extends BuilderStep
Author:
Fadelis
  • Method Summary

    Modifier and Type
    Method
    Description
    withRequest(Predicate<ReqT> requestPredicate)
    Adds a request matcher for the stub, which will trigger only if incoming request satisfies given Predicate.
    default BUILDER
    withRequest(ReqT request)
    Adds a request matcher for the stub, which will trigger only if incoming request is equal to the provided one.
  • Method Details

    • withRequest

      BUILDER withRequest(@Nonnull Predicate<ReqT> requestPredicate)

      Adds 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

      default BUILDER withRequest(@Nonnull ReqT request)

      Adds a request matcher for the stub, which will trigger only if incoming request is equal to the provided one.

      Only applicable to unary or server streaming methods.

      Subsequent request matchers will replace the old one.