Stanislav Vodetskyi
03/15/2024, 7:47 PMStanislav Vodetskyi
03/20/2024, 10:40 PMMatt (pactflow.io / pact-js / pact-go)
Stanislav Vodetskyi
03/20/2024, 10:41 PMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Stanislav Vodetskyi
03/20/2024, 11:10 PMproviderTestLib.NewPactBuilder(t).
GivenWithParameter(....). // same as pact
GetObject("interaction name"). // function name corresponding to the function name in the generated SDK
WithRequest(
// specify request object in terms of matchers - but it has to be translated into whether it's a query or body, and it's specific to a function we're calling
).
WillRespondWith(
matcher.StructMatcher{
"x": matcher.Like("y")
}
).
ExecuteTest(t, func(config consumer.MockServerConfig) error {
// instantiate client, make a call
})
Stanislav Vodetskyi
03/20/2024, 11:11 PMMatt (pactflow.io / pact-js / pact-go)