pact-foundation / pact-net

.NET version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.
https://pact.io
MIT License
823 stars 225 forks source link

Pact-Net: PactConfig does not appear to have parity with Pact-JS - Missing [Host] and [Port] properties #482

Closed daTooz closed 7 months ago

daTooz commented 7 months ago

Request: Add [Host] and [Port] properties to Pact-Net PactConfig class.

Using pact-js, I can create a new pact where I can specify those properties...

const provider = new Pact({ consumer: "consumer-js-v2", provider: "provider-js-v2", host: "127.0.0.1", port: 9999 });

By comparison, I cannot specify those same properties in Pact-Net...

var config = new PactConfig { PactDir = PactDir, Outputters = new List { new XunitOutput(output), new ConsoleOutput() }, LogLevel = PactLogLevel.Trace }; _pact = PactNet.Pact.V3(_consumerName, _providerName, config).WithHttpInteractions();

adamrodger commented 7 months ago

The host and port are arguments to the WithHttpInteractions method