pact-foundation/pact-support

Using a single Fixture(Mock Server) file to generate pact file

amith1988 opened this issue · 1 comments

Hi,

I am writing contract test for my APIs as per the https://github.com/tdshipley/pact-workshop-dotnet-core-v1

I have many APIs for which contract(pact test) need to be generated.
As per the suggested workshop, Do I have to create one fixture file for every pact test Or I can create a single fixture file which I can use for all my pact tests because I observe that there is only one thing which need to be changed

PactBuilder.ServiceConsumer("Consumer")
.HasPactWith("Provider");

Is it possible to use a single class and pass "Consumer" and "Provider" as parameter to it.
If yes, any example.?
Because I created a class and created a method which accepts two parameter(consumer,provider).
and calling above method in constructor of pact class. But it is not generating the pact file in pact folder.(though no failure while running).

I would suggest asking this in the #pact-net channel of slack.pact.io. This repository is for the Ruby pact-support gem, not for providing general pact support.