I have a question about provider tests. My consume...
# pact-net
n
I have a question about provider tests. My consumer tests are fine and its producing pact contract. When i run the provider tests against it, its returning data from db, even though I have faked data in repository using provider state middleware. How to return fake data that matches against the consumer contract?
m
How to return fake data that matches against the consumer contract
I’m confused about the question. Your provider just needs to respond as it normally would in real life. The only difference is, you are stubbing the repository layer. The data does not need to match exactly (unless you are not using matchers). What’s the actual problem you’re getting?
n
I have fixed it...Its just the DI in startup was not overrided by my fake repo. I have changed the order in TestStartup file and its working now. IS there anyway to publish the contract from consumer using .NET?
👍 1
m
IS there anyway to publish the contract from consumer using .NET?
the recommended way is to use the CLI tools