public void Ctor_SslCertFileEnvironmentVariableFromPlatformConfigIsGivenToRubyProcess() { var pactCoreHost = new PactCoreHostSpy <TestHostConfig>(new TestHostConfig("ssl-cert-file")); #if USE_NET4X Assert.True(pactCoreHost.SpyRubyProcess.StartInfo.EnvironmentVariables.ContainsKey("SSL_CERT_FILE")); Assert.EndsWith("ca-bundle.crt", pactCoreHost.SpyRubyProcess.StartInfo.EnvironmentVariables["SSL_CERT_FILE"]); #else Assert.True(pactCoreHost.SpyRubyProcess.StartInfo.Environment.ContainsKey("SSL_CERT_FILE")); Assert.EndsWith("ca-bundle.crt", pactCoreHost.SpyRubyProcess.StartInfo.Environment["SSL_CERT_FILE"]); #endif }
public void Ctor_WhenCalledWithSslCertFileEnvironmentVariable_DefaultValueShouldbeOverriden() { var pactCoreHost = new PactCoreHostSpy <TestHostConfig>(new TestHostConfig("ssl-cert-file", "SSL_CERT_FILE", "path-to-custom-ca-file")); #if USE_NET4X Assert.True(pactCoreHost.SpyRubyProcess.StartInfo.EnvironmentVariables.ContainsKey("SSL_CERT_FILE")); Assert.Equal("path-to-custom-ca-file", pactCoreHost.SpyRubyProcess.StartInfo.EnvironmentVariables["SSL_CERT_FILE"]); #else Assert.True(pactCoreHost.SpyRubyProcess.StartInfo.Environment.ContainsKey("SSL_CERT_FILE")); Assert.Equal("path-to-custom-ca-file", pactCoreHost.SpyRubyProcess.StartInfo.Environment["SSL_CERT_FILE"]); #endif }