Open solarmosaic-kflorence opened 3 years ago
Likewise for setupProviderState
it would be nice to support asynchronous setting up of state.
Actually, now that I understand how this works a little better, it seems like it would be best to just allow separating the standing up of the stub server from the shutting down of the stub server (for consumer tests). There should be different methods for starting and stopping it. That way it can be controlled either before and after each test or before and after all tests. This would allow for a more natural ScalaTest syntax (at least when using WordSpec
).
Related to https://github.com/ITV/scala-pact/issues/190
The
runConsumerTest
method is currently synchronous, because all of our code is asynchronous this means we have to useAwait.result
here instead of (in our case) ScalaTest'sAsyncWordSpec
. It would be better if this method were asynchronous by nature, and both a synchronous and asynchronous API were supported. (e.g.runConsumerTestAsync
).