diff --git a/src/Configuration/test/Kubernetes.ServiceBinding.Test/ServiceBindingConfigurationProviderTest.cs b/src/Configuration/test/Kubernetes.ServiceBinding.Test/ServiceBindingConfigurationProviderTest.cs index 673d09c023..10a645a924 100644 --- a/src/Configuration/test/Kubernetes.ServiceBinding.Test/ServiceBindingConfigurationProviderTest.cs +++ b/src/Configuration/test/Kubernetes.ServiceBinding.Test/ServiceBindingConfigurationProviderTest.cs @@ -146,12 +146,12 @@ public void PostProcessors_CanBeEnabled() private static string GetK8SResourcesDirectory(string name) { - return Path.Combine(Environment.CurrentDirectory, $"..\\..\\..\\resources\\k8s\\{name}"); + return Path.Combine(Environment.CurrentDirectory, "..", "..", "..", "resources", "k8s", $"{name}"); } private static string GetEmptyK8SResourcesDirectory() { - return Path.Combine(Environment.CurrentDirectory, "..\\..\\..\\resources\\k8s-empty\\"); + return Path.Combine(Environment.CurrentDirectory, "..", "..", "..", "resources", "k8s-empty"); } private class TestPostProcessor : IConfigurationPostProcessor diff --git a/src/Configuration/test/Kubernetes.ServiceBinding.Test/ServiceBindingConfigurationSourceTest.cs b/src/Configuration/test/Kubernetes.ServiceBinding.Test/ServiceBindingConfigurationSourceTest.cs index 1cbd2c8ca5..054afa9497 100644 --- a/src/Configuration/test/Kubernetes.ServiceBinding.Test/ServiceBindingConfigurationSourceTest.cs +++ b/src/Configuration/test/Kubernetes.ServiceBinding.Test/ServiceBindingConfigurationSourceTest.cs @@ -29,7 +29,7 @@ public void EnvironmentVariableSet() try { var source = new ServiceBindingConfigurationSource(); - Assert.Contains("resources\\k8s", source.ServiceBindingRoot, StringComparison.OrdinalIgnoreCase); + Assert.Contains(Path.Combine("resources", "k8s"), source.ServiceBindingRoot, StringComparison.OrdinalIgnoreCase); Assert.NotNull(source.FileProvider); Assert.NotNull(source.FileProvider.GetDirectoryContents("/")); } @@ -61,6 +61,6 @@ public void Build_CapturesParentConfiguration() private static string GetK8SResourcesDirectory(string name) { - return Path.Combine(Environment.CurrentDirectory, $"..\\..\\..\\resources\\k8s\\{name}"); + return Path.Combine(Environment.CurrentDirectory, "..", "..", "..", "resources", "k8s", $"{name}"); } } diff --git a/src/Configuration/test/Kubernetes.ServiceBinding.Test/ServiceBindingTest.cs b/src/Configuration/test/Kubernetes.ServiceBinding.Test/ServiceBindingTest.cs index b7b51fe26a..81853be225 100644 --- a/src/Configuration/test/Kubernetes.ServiceBinding.Test/ServiceBindingTest.cs +++ b/src/Configuration/test/Kubernetes.ServiceBinding.Test/ServiceBindingTest.cs @@ -24,7 +24,7 @@ public void PopulatesFromFileSystem_Kubernetes() Assert.Equal("test-name-1", binding.Name); Assert.Equal("test-type-1", binding.Type); Assert.Equal("test-provider-1", binding.Provider); - Assert.Contains("resources\\k8s\\test-name-1", binding.Path, StringComparison.OrdinalIgnoreCase); + Assert.Contains(Path.Combine("resources", "k8s", "test-name-1"), binding.Path, StringComparison.OrdinalIgnoreCase); Assert.NotNull(binding.Secrets); Assert.Single(binding.Secrets); Assert.Equal("test-secret-value", binding.Secrets["test-secret-key"]); @@ -39,7 +39,7 @@ public void PopulatesFromFileSystem_WithHiddenFilesAndLinks_Kubernetes() Assert.Equal("test-k8s", binding.Name); Assert.Equal("test-type-1", binding.Type); Assert.Equal("test-provider-1", binding.Provider); - Assert.Contains("resources\\k8s\\test-k8s", binding.Path, StringComparison.OrdinalIgnoreCase); + Assert.Contains(Path.Combine("resources", "k8s", "test-k8s"), binding.Path, StringComparison.OrdinalIgnoreCase); Assert.NotNull(binding.Secrets); Assert.Single(binding.Secrets); Assert.Equal("test-secret-value", binding.Secrets["test-secret-key"]); @@ -47,6 +47,6 @@ public void PopulatesFromFileSystem_WithHiddenFilesAndLinks_Kubernetes() private static string GetK8SResourcesDirectory(string name) { - return Path.Combine(Environment.CurrentDirectory, $"..\\..\\..\\resources\\k8s\\{name}"); + return Path.Combine(Environment.CurrentDirectory, "..", "..", "..", "resources", "k8s", $"{name}"); } } diff --git a/src/Configuration/test/Kubernetes.ServiceBinding.Test/ServiceBindingsTest.cs b/src/Configuration/test/Kubernetes.ServiceBinding.Test/ServiceBindingsTest.cs index 14707d63cd..ffb9906b94 100644 --- a/src/Configuration/test/Kubernetes.ServiceBinding.Test/ServiceBindingsTest.cs +++ b/src/Configuration/test/Kubernetes.ServiceBinding.Test/ServiceBindingsTest.cs @@ -28,6 +28,6 @@ public void PopulatesContent() private static string GetK8SResourcesDirectory() { - return Path.Combine(Environment.CurrentDirectory, "..\\..\\..\\resources\\k8s\\"); + return Path.Combine(Environment.CurrentDirectory, "..", "..", "..", "resources", "k8s"); } }