@@ -57,7 +57,7 @@ public void Launch_WhenLinuxInstalledGuiExists_StartsOptExecutable()
5757 [ Fact ]
5858 public void Launch_WhenLinuxInstalledGuiIsMissing_ReturnsExecutableNotFoundError ( )
5959 {
60- var errorWriter = new StringWriter ( ) ;
60+ using var errorWriter = new StringWriter ( ) ;
6161 var originalError = Console . Error ;
6262
6363 try
@@ -102,7 +102,7 @@ public void GetCandidatePaths_WhenUnixSourceBuild_UsesUnixExecutableName()
102102 [ Fact ]
103103 public void Launch_WhenProcessCannotStart_ReturnsFailure ( )
104104 {
105- var baseDirectory = Path . Combine ( Path . GetTempPath ( ) , $ "cdlocker-gui-launcher-tests-{ Guid . NewGuid ( ) : N} ") ;
105+ var baseDirectory = Path . Join ( Path . GetTempPath ( ) , $ "cdlocker-gui-launcher-tests-{ Guid . NewGuid ( ) : N} ") ;
106106 var expectedExecutable = Path . GetFullPath ( Path . Combine ( baseDirectory , "ColDogLocker" ) ) ;
107107 var environment = CreateEnvironment (
108108 isMacOS : false ,
@@ -147,7 +147,7 @@ public void Launch_WhenMacOsInstalledAppExists_StartsAppBundleExecutable()
147147 [ Fact ]
148148 public void Launch_WhenMacOsInstalledAppIsMissing_ReturnsExecutableNotFoundError ( )
149149 {
150- var errorWriter = new StringWriter ( ) ;
150+ using var errorWriter = new StringWriter ( ) ;
151151 var originalError = Console . Error ;
152152
153153 try
@@ -171,7 +171,7 @@ public void Launch_WhenMacOsInstalledAppIsMissing_ReturnsExecutableNotFoundError
171171 [ Fact ]
172172 public void GetCandidatePaths_WhenSourceTreeAndInstalledFallbackExist_PrefersSourceTreeBeforeInstalledFallback ( )
173173 {
174- var sourceRoot = Path . Combine ( Path . GetTempPath ( ) , $ "cdlocker-source-{ Guid . NewGuid ( ) : N} ") ;
174+ var sourceRoot = Path . Join ( Path . GetTempPath ( ) , $ "cdlocker-source-{ Guid . NewGuid ( ) : N} ") ;
175175 var baseDirectory = Path . Combine ( sourceRoot , "ColDogLocker.Cli" , "bin" , "Debug" , "net10.0" ) ;
176176 var sourceCandidate = Path . Combine ( sourceRoot , "ColDogLocker.Avalonia" , "bin" , "Debug" , "net10.0" , "ColDogLocker" ) ;
177177 var environment = CreateEnvironment (
@@ -202,7 +202,7 @@ private static GuiLauncherEnvironment CreateEnvironment(
202202 {
203203 return new GuiLauncherEnvironment
204204 {
205- BaseDirectory = baseDirectory ?? Path . Combine ( Path . GetTempPath ( ) , $ "cdlocker-gui-launcher-tests-{ Guid . NewGuid ( ) : N} ") ,
205+ BaseDirectory = baseDirectory ?? Path . Join ( Path . GetTempPath ( ) , $ "cdlocker-gui-launcher-tests-{ Guid . NewGuid ( ) : N} ") ,
206206 IsMacOS = isMacOS ,
207207 IsLinux = isLinux ,
208208 IsWindows = isWindows ,
0 commit comments