Hello, is there a way to configure WireMock in Spr...
# help
l
Hello, is there a way to configure WireMock in Spring so I can use it as a Spring Bean? Currently our tests extend from a MainContext class which uses @EnableWireMock and @InjectWireMock to inject a WireMock Server. However for files which do not extend from this (e.g a Mock file) there is not an easy way to pass the WireMock Server as it is not a Spring Bean. We have to set the server from another test file. Which is awkward. I know we can do it manually with a ContextInitialiser or with WireMockConfiguration but we were trying to move away with this with the @InjectWireMock. Any help appreciated!
b
l
Thanks Boris. This is actually what we have been using but WireMock handles the server so cannot pass it around the app as easily as a Spring Bean could