public IMockProviderService MockService( int port, JsonSerializerSettings jsonSerializerSettings, bool enableSsl = false, IPAddress host = IPAddress.Loopback, string sslCert = null, string sslKey = null) { 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."); } if (_mockProviderService != null) { _mockProviderService.Stop(); } _mockProviderService = _mockProviderServiceFactory(port, enableSsl, ConsumerName, ProviderName, host, jsonSerializerSettings, sslCert, sslKey); _mockProviderService.Start(); return(_mockProviderService); }
public IMockProviderService MockService(int port, bool enableSsl = false) { if (_mockProviderService != null) { _mockProviderService.Stop(); } _mockProviderService = _mockProviderServiceFactory(port, enableSsl); _mockProviderService.Start(); return _mockProviderService; }
public IMockProviderService MockService(int port, bool enableSsl = false) { if (_mockProviderService != null) { _mockProviderService.Stop(); } _mockProviderService = _mockProviderServiceFactory(port, enableSsl); _mockProviderService.Start(); return(_mockProviderService); }
public IMockProviderService MockService(int port) { if (_mockProviderService != null) { _mockProviderService.Stop(); } _mockProviderService = _mockProviderServiceFactory(port); _mockProviderService.Start(); return(_mockProviderService); }
public IMockProviderService MockService(int port, JsonSerializerSettings jsonSerializerSettings, bool enableSsl = false, bool bindOnAllAdapters = false) { if (_mockProviderService != null) { _mockProviderService.Stop(); } if (jsonSerializerSettings != null) { JsonConfig.ApiSerializerSettings = jsonSerializerSettings; } _mockProviderService = _mockProviderServiceFactory(port, enableSsl, ProviderName, bindOnAllAdapters); _mockProviderService.Start(); return(_mockProviderService); }
public IMockProviderService MockService(int port) { if (_mockProviderService != null) { _mockProviderService.Stop(); } _mockProviderService = _mockProviderServiceFactory(port); _mockProviderService.Start(); return _mockProviderService; }
public IMockProviderService MockService(int port, JsonSerializerSettings jsonSerializerSettings, bool enableSsl = false) { if (_mockProviderService != null) { _mockProviderService.Stop(); } if (jsonSerializerSettings != null) { JsonConfig.ApiSerializerSettings = jsonSerializerSettings; } _mockProviderService = _mockProviderServiceFactory(port, enableSsl, ProviderName); _mockProviderService.Start(); return _mockProviderService; }
public void Start() { _decoratedMockProvider.Start(); }
public void SetUp() { _fakeOmdbService = new PactBuilder().MockService(5842); _fakeOmdbService.Start(); }