wiremock / wiremock-grpc-extension

WireMock Extension: gRPC mocking
https://wiremock.org/docs/grpc/
Apache License 2.0
14 stars 8 forks source link

Example with multiple items in a streaming response? #55

Open ryanlewis opened 6 months ago

ryanlewis commented 6 months ago

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