wiremock / wiremock-grpc-extension

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

Add a constructor to `WireMockGrpcService` that accepts an `Options` argument #80

Closed Nahuel92 closed 2 months ago

Nahuel92 commented 2 months ago

Proposal

Hi. As part of the library I'm creating to help devs to create tests using WireMock and Micronaut, I'm trying to write logic to return (from an Options object) either a WireMockGrpcService or a WireMockServer.

Unfortunately, both classes have different constructors and there isn't a clean way to do so. What I would like to know is if it's possible to have a constructor similar to the one in WireMockServer:

public WireMockServer(Options options) {
    // ...
}

Like this:

public WireMockGrpcService(Options options) {
    // ...
}

That way, I can simplify my code a lot, which will help with maintainability.

Another suggestion I would like to leave here is if it's possible to create an interface that both classes can implement to facilitate working with them.

Thanks.

References

No response

Nahuel92 commented 2 months ago

I realized my assumptions were wrong. I'll close it and if I need it I'll re-open it.