Hello guys. I'm exploring Release - 4.0.0-beta.1. Couldn't find a way to define provider states on consumer side. How can I do this?
t
Tawfik Nouri
02/15/2022, 8:20 PM
Hi David,
I think you can use the "Given" to define the provider states
pact.UponReceiving("A valid request for all products")
.Given("products exist")
.WithRequest(HttpMethod.Get, "/api/products")
.WillRespond( .........
☝️ 1
f
Fábio Rodrigues
02/16/2022, 10:27 AM
there is no given when using intellisense. the others appears (WIthRquest, UponReceiving)
d
David Hvilava
02/16/2022, 10:40 AM
@Tawfik Nouri, thank you. It indeed appears after "UponReceiving"