@@ -16,7 +16,6 @@ internal sealed class TestResultComposer
1616 private readonly TestContext _testContext ;
1717 private readonly bool _useDedicatedTestResultsDirectory ;
1818 private readonly string _defaultRunDirectory ;
19- private readonly string _dedicatedRunDirectory ;
2019 private readonly string _runDirectory ;
2120 private readonly string _testDirectory ;
2221 private readonly string _expectedDirectory ;
@@ -29,8 +28,8 @@ public TestResultComposer(TestContext testContext, bool useDedicatedTestResultsD
2928 this . _testContext = testContext ;
3029 this . _useDedicatedTestResultsDirectory = useDedicatedTestResultsDirectory ;
3130 this . _defaultRunDirectory = testContext . TestRunResultsDirectory ;
32- this . _dedicatedRunDirectory = BuildDedicatedRunDirectory ( testContext ) ;
33- this . _runDirectory = this . _useDedicatedTestResultsDirectory ? this . _dedicatedRunDirectory : this . _defaultRunDirectory ;
31+ string dedicatedRunDirectory = BuildDedicatedRunDirectory ( testContext ) ;
32+ this . _runDirectory = this . _useDedicatedTestResultsDirectory ? dedicatedRunDirectory : this . _defaultRunDirectory ;
3433 this . _testDirectory = Path . Combine ( this . _runDirectory , "TestResults" , testContext . TestName ) ;
3534 this . _expectedDirectory = Path . Combine ( this . _runDirectory , ExpectedDirectoryName ) ;
3635 this . _actualDirectory = Path . Combine ( this . _runDirectory , ActualDirectoryName ) ;
@@ -197,7 +196,7 @@ private static string BuildDedicatedRunDirectory(TestContext testContext)
197196 Assembly assembly = TestImplementationResolver . ResolveTestAssembly ( testContext ) ;
198197 string assemblyName = assembly . GetName ( ) . Name ;
199198 string directoryName = new DirectoryInfo ( testContext . TestRunDirectory ) . Name ;
200- string path = Path . Combine ( Path . GetTempPath ( ) , assemblyName , "TestResults" , directoryName ) ;
199+ string path = Path . Combine ( Path . GetTempPath ( ) , assemblyName , directoryName ) ;
201200 return path ;
202201 }
203202 }
0 commit comments