Using wiremock-grpc, it doesn’t seem that the veri...
# general
e
Using wiremock-grpc, it doesn’t seem that the verification stuff is quite there yet. Are there plans to add it?
o
You mean protocol verification?
aka "contract testing" or whatever similar use-case
e
something like what I can do with the regular `WireMockServer`:
Copy code
this.wireMockServer.verify(5,
      getRequestedFor(urlEqualTo(VILLAIN_RANDOM_URI))
        .withHeader(ACCEPT, equalTo(APPLICATION_JSON))
    );
there’s no equivalent on the gRPC side (
WireMockGrpcService
)
o
Yep. Good feedback for @Tom ^
e
Its also missing the ability to reset the mocks
I had to manually hang on to a reference to the
WireMock
instance thats passed into the constructor to be able to do that in an
@BeforeEach
method
t
You’re correct - we haven’t added extension DSL methods for verification yet, but you can still do this with WireMock’s core DSL e.g.: https://github.com/wiremock/wiremock-payments-demo-app/blob/main/src/test/java/wiremock/demo/DemoBffGrpcIntegrationTest.java#L124
You can reset the mocks via the core DSL too (not even sure there’s a need to add this to the extension DSL as it’d be identical)
e
Thanks for that link! To use that do you have to use the
WireMockExtension
approach? In my case I can’t really do that. I can construct a
WireMock
or
WireMockGrpcService
instance