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); } }
private void PersistPactFile() { if (String.IsNullOrEmpty(ConsumerName)) { throw new InvalidOperationException("ConsumerName has not been set, please supply a consumer name using the ServiceConsumer method."); } if (String.IsNullOrEmpty(ProviderName)) { throw new InvalidOperationException("ProviderName has not been set, please supply a provider name using the HasPactWith method."); } var pactDetails = new PactDetails { Provider = new Pacticipant { Name = ProviderName }, Consumer = new Pacticipant { Name = ConsumerName } }; _mockProviderService.SendAdminHttpRequest(HttpVerb.Post, Constants.PactPath, pactDetails); }
private void PersistPactFile() { _mockProviderService.SendAdminHttpRequest(HttpVerb.Post, Constants.PactPath); }
public void SendAdminHttpRequest(HttpVerb method, string path) { _decoratedMockProvider.SendAdminHttpRequest(method, path); }