quarkiverse / quarkus-wiremock

Quarkus extension for launching an in-process Wiremock server
https://wiremock.org/
Apache License 2.0
15 stars 8 forks source link

feat: ConnectWireMock annotation introduced #65

Closed chberger closed 7 months ago

chberger commented 7 months ago

This PR simplifies the WireMock Test API by hiding implementation details.

Instead of referencing a QuarkusTestResourceLifecycleManager directly, a user can annotate it's test class with @ConnectWireMock. This gives us a little bit more flexibility as user tests would not need to link the WireMockServerConnector (TestResourceLifecycleManager) directly.

Furthermore, I've refrained from introducing another Inject annotation. This solution is inspired by Quarkus and the possibility to inject a DevServiceContext in a test class without any annotation at all.

Reference: https://quarkus.io/guides/getting-started-testing#testing-dev-services https://github.com/quarkusio/quarkus/blob/2.5.0.Final/integration-tests/mongodb-rest-data-panache/src/test/java/io/quarkus/it/mongodb/rest/data/panache/MongoDbRestDataPanacheIT.java

chberger commented 7 months ago

@wjglerum Would you like to review this PR?