Bo Damgaard Mortensen
04/04/2023, 3:56 PMpublic class ConsumerClass
{
public string MyProperty { get; init; }
}
public class ProviderClass
{
public string? MyProperty { get; init; }
}
and in my consumer test, I've set the following: .WithJsonBody(Match.Type(new ConsumerClass { MyProperty = "test" }));
(since I don't want to validate the actual values)
I'd expect the provider test to fail this, since I have marked MyProperty
to be a nullable property.Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Think of the matchers as saying “this test covers all cases that pass this matcher”, not “this is the response schema”
Matt (pactflow.io / pact-js / pact-go)
Slackbot
04/05/2023, 1:11 AMBo Damgaard Mortensen
04/05/2023, 10:28 AMMatt (pactflow.io / pact-js / pact-go)