wiremock-grpc-extension icon indicating copy to clipboard operation
wiremock-grpc-extension copied to clipboard

Example with multiple items in a streaming response?

Open ryanlewis opened this issue 11 months ago • 0 comments

Proposal

Currently, the example Java project contains an example that returns a streaming response, but only returns a single item:

  @Test
  void unary_request_streaming_response() {
    mockGreetingService.stubFor(
        method("oneGreetingManyReplies")
            .willReturn(message(HelloResponse.newBuilder().setGreeting("Hi Tom"))));

    assertThat(greetingsClient.oneGreetingManyReplies("Tom"), hasItem("Hi Tom"));
  }

Could we add a way to be able to return a stream of responses, i.e. multiple HelloResponse instances?

References

No response

ryanlewis avatar Feb 29 '24 11:02 ryanlewis