private void PersistPactFile() { var responsePact = _mockProviderService.SendAdminHttpRequest(HttpVerb.Post, Constants.PactPath); if (_mockProviderService.UseRemoteMockService) { File.WriteAllText($"{_pactDir}\\{ConsumerName.ToLower()}{ProviderName.ToLower()}.json", responsePact); } }
private void PersistPactFile() { var responsePact = _mockProviderService.SendAdminHttpRequest(HttpVerb.Post, Constants.PactPath); if (_mockProviderService.UseRemoteMockService) { string fileName = ConsumerName.ToLower() + ProviderName.ToLower() + ".json"; File.WriteAllText(Path.Combine(_pactDir, fileName), responsePact); } }
//[Ignore("PACT FLOW")] public void PublishToPactFlow() { // fake Git HashCode (only for demo) var version = "725c611"; // master (only for demo) var tags = new[] { "master" }; var token = Environment.GetEnvironmentVariable("PACT_BROKER_TOKEN"); var pactPublisher = new PactPublisher("https://expandtesting.pact.dius.com.au", new PactUriOptions(token)); pactPublisher.PublishToBroker($"../../../../../pacts/{ConsumerName.ToLower()}-{ProviderName.ToLower()}.json", version, tags); }
public async Task PublishToPactBroker() { var pactPublisher = new PactPublisher("http://localhost:8090"); pactPublisher.PublishToBroker($"../../pacts/{ConsumerName.ToLower()}-{ProviderName.ToLower()}.json", "1.0.0"); }