@@ -12,8 +12,6 @@ class IntegrationTestEnvironment : IEnvironment
1212 private static readonly ILogging logger = LogHelper . GetLogger < IntegrationTestEnvironment > ( ) ;
1313 private readonly bool enableTrace ;
1414
15- private readonly NPath integrationTestEnvironmentPath ;
16-
1715 private DefaultEnvironment defaultEnvironment ;
1816
1917 public IntegrationTestEnvironment ( ICacheContainer cacheContainer ,
@@ -26,13 +24,10 @@ public IntegrationTestEnvironment(ICacheContainer cacheContainer,
2624 defaultEnvironment = new DefaultEnvironment ( cacheContainer ) ;
2725 defaultEnvironment . FileSystem . SetCurrentDirectory ( repoPath ) ;
2826 environmentPath = environmentPath ??
29- defaultEnvironment . GetSpecialFolder ( Environment . SpecialFolder . LocalApplicationData )
30- . ToNPath ( )
31- . EnsureDirectoryExists ( ApplicationInfo . ApplicationName + "-IntegrationTests" ) ;
27+ defaultEnvironment . UserCachePath . EnsureDirectoryExists ( "IntegrationTests" ) ;
3228
33- integrationTestEnvironmentPath = environmentPath . Value ;
34- UserCachePath = integrationTestEnvironmentPath . Combine ( "User" ) ;
35- SystemCachePath = integrationTestEnvironmentPath . Combine ( "System" ) ;
29+ UserCachePath = environmentPath . Value . Combine ( "User" ) ;
30+ SystemCachePath = environmentPath . Value . Combine ( "System" ) ;
3631
3732 var installPath = solutionDirectory . Parent . Parent . Combine ( "src" , "GitHub.Api" ) ;
3833
@@ -76,7 +71,7 @@ public string GetEnvironmentVariable(string v)
7671
7772 public string GetSpecialFolder ( Environment . SpecialFolder folder )
7873 {
79- var ensureDirectoryExists = integrationTestEnvironmentPath . EnsureDirectoryExists ( folder . ToString ( ) ) ;
74+ var ensureDirectoryExists = UserCachePath . Parent . EnsureDirectoryExists ( folder . ToString ( ) ) ;
8075 var specialFolderPath = ensureDirectoryExists . ToString ( ) ;
8176
8277 if ( enableTrace )
@@ -87,7 +82,7 @@ public string GetSpecialFolder(Environment.SpecialFolder folder)
8782 return specialFolderPath ;
8883 }
8984
90- public string UserProfilePath => integrationTestEnvironmentPath . CreateDirectory ( "user- profile- path" ) ;
85+ public string UserProfilePath => UserCachePath . Parent . CreateDirectory ( "user profile path" ) ;
9186
9287 public NPath Path => Environment . GetEnvironmentVariable ( "PATH" ) . ToNPath ( ) ;
9388 public string NewLine => Environment . NewLine ;
0 commit comments