@@ -13,9 +13,6 @@ public static class ConfigurationFileLocatorTests
1313{
1414 public class DefaultConfigFileLocatorTests : TestBase
1515 {
16- private const string DefaultRepoPath = @"c:\MyGitRepo" ;
17- private const string DefaultWorkingPath = @"c:\MyGitRepo\Working" ;
18-
1916 private string repoPath ;
2017 private string workingPath ;
2118 private IFileSystem fileSystem ;
@@ -25,8 +22,8 @@ public class DefaultConfigFileLocatorTests : TestBase
2522 [ SetUp ]
2623 public void Setup ( )
2724 {
28- this . repoPath = DefaultRepoPath ;
29- this . workingPath = DefaultWorkingPath ;
25+ this . repoPath = Path . Combine ( PathHelper . GetTempPath ( ) , "MyGitRepo" ) ;
26+ this . workingPath = Path . Combine ( PathHelper . GetTempPath ( ) , "MyGitRepo" , "Working" ) ;
3027 var options = Options . Create ( new GitVersionOptions { WorkingDirectory = repoPath } ) ;
3128
3229 var sp = ConfigureServices ( services => services . AddSingleton ( options ) ) ;
@@ -76,8 +73,8 @@ private string SetupConfigFileContent(string text, string fileName, string path)
7673
7774 public class NamedConfigurationFileLocatorTests : TestBase
7875 {
79- private const string DefaultRepoPath = @"c:\ MyGitRepo";
80- private const string DefaultWorkingPath = @"c:\ MyGitRepo\ Working";
76+ private static readonly string DefaultRepoPath = Path . Combine ( PathHelper . GetTempPath ( ) , " MyGitRepo") ;
77+ private static readonly string DefaultWorkingPath = Path . Combine ( PathHelper . GetTempPath ( ) , " MyGitRepo" , " Working") ;
8178 private const string myConfigYaml = "my-config.yaml" ;
8279
8380 private string repoPath ;
@@ -189,7 +186,7 @@ public void NoWarnOnCustomYmlFileOutsideRepoPath()
189186 this . configFileLocator = sp . GetRequiredService < IConfigurationFileLocator > ( ) ;
190187 this . fileSystem = sp . GetRequiredService < IFileSystem > ( ) ;
191188
192- SetupConfigFileContent ( string . Empty , path : @"c:\\Unrelated\\path" ) ;
189+ SetupConfigFileContent ( string . Empty , path : PathHelper . Combine ( PathHelper . GetTempPath ( ) , "unrelatedPath" ) ) ;
193190
194191 var configurationProvider = ( ConfigurationProvider ) sp . GetRequiredService < IConfigurationProvider > ( ) ;
195192
0 commit comments