diff --git a/src/Microsoft.DotNet.Configurer/AspNetCertificateSentinel.cs b/src/Microsoft.DotNet.Configurer/AspNetCertificateSentinel.cs index c8dc622c0..7a8e282e9 100644 --- a/src/Microsoft.DotNet.Configurer/AspNetCertificateSentinel.cs +++ b/src/Microsoft.DotNet.Configurer/AspNetCertificateSentinel.cs @@ -21,7 +21,7 @@ namespace Microsoft.DotNet.Configurer private string SentinelPath => Path.Combine(_dotnetUserProfileFolderPath, SENTINEL); - public AspNetCertificateSentinel(CliFolderPathCalculator cliFallbackFolderPathCalculator) : + public AspNetCertificateSentinel() : this( CliFolderPathCalculator.DotnetUserProfileFolderPath, FileSystemWrapper.Default.File, diff --git a/src/Microsoft.DotNet.Configurer/CliFolderPathCalculator.cs b/src/Microsoft.DotNet.Configurer/CliFolderPathCalculator.cs index f75920997..40f6f3970 100644 --- a/src/Microsoft.DotNet.Configurer/CliFolderPathCalculator.cs +++ b/src/Microsoft.DotNet.Configurer/CliFolderPathCalculator.cs @@ -8,16 +8,20 @@ using NuGet.Common; namespace Microsoft.DotNet.Configurer { - public class CliFolderPathCalculator + public static class CliFolderPathCalculator { private const string DotnetProfileDirectoryName = ".dotnet"; private const string ToolsShimFolderName = "tools"; - public string CliFallbackFolderPath => Environment.GetEnvironmentVariable("DOTNET_CLI_TEST_FALLBACKFOLDER") ?? - Path.Combine(new DirectoryInfo(AppContext.BaseDirectory).Parent.FullName, "NuGetFallbackFolder"); - public string ToolsShimPath => Path.Combine(DotnetUserProfileFolderPath, ToolsShimFolderName); - public string ToolsPackagePath => ToolPackageFolderPathCalculator.GetToolPackageFolderPath(ToolsShimPath); - public BashPathUnderHomeDirectory ToolsShimPathInUnix + public static string CliFallbackFolderPath => + Environment.GetEnvironmentVariable("DOTNET_CLI_TEST_FALLBACKFOLDER") ?? + Path.Combine(new DirectoryInfo(AppContext.BaseDirectory).Parent.FullName, "NuGetFallbackFolder"); + + public static string ToolsShimPath => Path.Combine(DotnetUserProfileFolderPath, ToolsShimFolderName); + + public static string ToolsPackagePath => ToolPackageFolderPathCalculator.GetToolPackageFolderPath(ToolsShimPath); + + public static BashPathUnderHomeDirectory ToolsShimPathInUnix { get { @@ -37,7 +41,7 @@ namespace Microsoft.DotNet.Configurer } } - public string NuGetUserSettingsDirectory => + public static string NuGetUserSettingsDirectory => NuGetEnvironment.GetFolderPath(NuGetFolderPath.UserSettingsDirectory); } } diff --git a/src/Microsoft.DotNet.Configurer/FirstTimeUseNoticeSentinel.cs b/src/Microsoft.DotNet.Configurer/FirstTimeUseNoticeSentinel.cs index 78ae9caa5..84ad4bb3a 100644 --- a/src/Microsoft.DotNet.Configurer/FirstTimeUseNoticeSentinel.cs +++ b/src/Microsoft.DotNet.Configurer/FirstTimeUseNoticeSentinel.cs @@ -19,7 +19,7 @@ namespace Microsoft.DotNet.Configurer private string SentinelPath => Path.Combine(_dotnetUserProfileFolderPath, SENTINEL); - public FirstTimeUseNoticeSentinel(CliFolderPathCalculator cliFolderPathCalculator) : + public FirstTimeUseNoticeSentinel() : this( CliFolderPathCalculator.DotnetUserProfileFolderPath, FileSystemWrapper.Default.File, diff --git a/src/Microsoft.DotNet.Configurer/NuGetCachePrimer.cs b/src/Microsoft.DotNet.Configurer/NuGetCachePrimer.cs index a0bc3bca5..6d71b89b5 100644 --- a/src/Microsoft.DotNet.Configurer/NuGetCachePrimer.cs +++ b/src/Microsoft.DotNet.Configurer/NuGetCachePrimer.cs @@ -17,31 +17,20 @@ namespace Microsoft.DotNet.Configurer private readonly INuGetCacheSentinel _nuGetCacheSentinel; - private readonly CliFolderPathCalculator _cliFolderPathCalculator; - - public NuGetCachePrimer( - INuGetPackagesArchiver nugetPackagesArchiver, - INuGetCacheSentinel nuGetCacheSentinel, - CliFolderPathCalculator cliFolderPathCalculator) - : this(nugetPackagesArchiver, - nuGetCacheSentinel, - cliFolderPathCalculator, - FileSystemWrapper.Default.File) + public NuGetCachePrimer(INuGetPackagesArchiver nugetPackagesArchiver, INuGetCacheSentinel nuGetCacheSentinel) + : this(nugetPackagesArchiver, nuGetCacheSentinel, FileSystemWrapper.Default.File) { } internal NuGetCachePrimer( INuGetPackagesArchiver nugetPackagesArchiver, INuGetCacheSentinel nuGetCacheSentinel, - CliFolderPathCalculator cliFolderPathCalculator, IFile file) { _nugetPackagesArchiver = nugetPackagesArchiver; _nuGetCacheSentinel = nuGetCacheSentinel; - _cliFolderPathCalculator = cliFolderPathCalculator; - _file = file; } @@ -52,7 +41,7 @@ namespace Microsoft.DotNet.Configurer return; } - var nuGetFallbackFolder = _cliFolderPathCalculator.CliFallbackFolderPath; + var nuGetFallbackFolder = CliFolderPathCalculator.CliFallbackFolderPath; _nugetPackagesArchiver.ExtractArchive(nuGetFallbackFolder); diff --git a/src/Microsoft.DotNet.Configurer/NuGetCacheSentinel.cs b/src/Microsoft.DotNet.Configurer/NuGetCacheSentinel.cs index ebaff5819..53a2137bd 100644 --- a/src/Microsoft.DotNet.Configurer/NuGetCacheSentinel.cs +++ b/src/Microsoft.DotNet.Configurer/NuGetCacheSentinel.cs @@ -27,8 +27,8 @@ namespace Microsoft.DotNet.Configurer private Stream InProgressSentinel { get; set; } - public NuGetCacheSentinel(CliFolderPathCalculator cliFolderPathCalculator) : - this(cliFolderPathCalculator.CliFallbackFolderPath, + public NuGetCacheSentinel() : + this(CliFolderPathCalculator.CliFallbackFolderPath, FileSystemWrapper.Default.File, FileSystemWrapper.Default.Directory) { diff --git a/src/Microsoft.DotNet.Configurer/UserLevelCacheWriter.cs b/src/Microsoft.DotNet.Configurer/UserLevelCacheWriter.cs index eeb69e526..678445ae7 100644 --- a/src/Microsoft.DotNet.Configurer/UserLevelCacheWriter.cs +++ b/src/Microsoft.DotNet.Configurer/UserLevelCacheWriter.cs @@ -14,7 +14,7 @@ namespace Microsoft.DotNet.Configurer private readonly IDirectory _directory; private string _dotnetUserProfileFolderPath; - public UserLevelCacheWriter(CliFolderPathCalculator cliFolderPathCalculator) : + public UserLevelCacheWriter() : this( CliFolderPathCalculator.DotnetUserProfileFolderPath, FileSystemWrapper.Default.File, diff --git a/src/dotnet/Program.cs b/src/dotnet/Program.cs index 2e9dafea5..6e0dbeee1 100644 --- a/src/dotnet/Program.cs +++ b/src/dotnet/Program.cs @@ -88,15 +88,14 @@ namespace Microsoft.DotNet.Cli var success = true; var command = string.Empty; var lastArg = 0; - var cliFallbackFolderPathCalculator = new CliFolderPathCalculator(); TopLevelCommandParserResult topLevelCommandParserResult = TopLevelCommandParserResult.Empty; - using (INuGetCacheSentinel nugetCacheSentinel = new NuGetCacheSentinel(cliFallbackFolderPathCalculator)) + using (INuGetCacheSentinel nugetCacheSentinel = new NuGetCacheSentinel()) using (IFirstTimeUseNoticeSentinel disposableFirstTimeUseNoticeSentinel = - new FirstTimeUseNoticeSentinel(cliFallbackFolderPathCalculator)) + new FirstTimeUseNoticeSentinel()) { IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel = disposableFirstTimeUseNoticeSentinel; - IAspNetCertificateSentinel aspNetCertificateSentinel = new AspNetCertificateSentinel(cliFallbackFolderPathCalculator); + IAspNetCertificateSentinel aspNetCertificateSentinel = new AspNetCertificateSentinel(); IFileSentinel toolPathSentinel = new FileSentinel( new FilePath( Path.Combine( @@ -174,7 +173,6 @@ namespace Microsoft.DotNet.Cli firstTimeUseNoticeSentinel, aspNetCertificateSentinel, toolPathSentinel, - cliFallbackFolderPathCalculator, hasSuperUserAccess, dotnetFirstRunConfiguration, environmentProvider); @@ -241,7 +239,6 @@ namespace Microsoft.DotNet.Cli IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel, IAspNetCertificateSentinel aspNetCertificateSentinel, IFileSentinel toolPathSentinel, - CliFolderPathCalculator cliFolderPathCalculator, bool hasSuperUserAccess, DotnetFirstRunConfiguration dotnetFirstRunConfiguration, IEnvironmentProvider environmentProvider) @@ -249,15 +246,11 @@ namespace Microsoft.DotNet.Cli using (PerfTrace.Current.CaptureTiming()) { var nugetPackagesArchiver = new NuGetPackagesArchiver(); - var environmentPath = EnvironmentPathFactory.CreateEnvironmentPath( - cliFolderPathCalculator, - hasSuperUserAccess, - environmentProvider); + var environmentPath = EnvironmentPathFactory.CreateEnvironmentPath(hasSuperUserAccess, environmentProvider); var commandFactory = new DotNetCommandFactory(alwaysRunOutOfProc: true); var nugetCachePrimer = new NuGetCachePrimer( nugetPackagesArchiver, - nugetCacheSentinel, - cliFolderPathCalculator); + nugetCacheSentinel); var aspnetCertificateGenerator = new AspNetCoreCertificateGenerator(); var dotnetConfigurer = new DotnetFirstTimeUseConfigurer( nugetCachePrimer, @@ -268,7 +261,7 @@ namespace Microsoft.DotNet.Cli toolPathSentinel, dotnetFirstRunConfiguration, Reporter.Output, - cliFolderPathCalculator.CliFallbackFolderPath, + CliFolderPathCalculator.CliFallbackFolderPath, environmentPath); dotnetConfigurer.Configure(); diff --git a/src/dotnet/ShellShim/EnvironmentPathFactory.cs b/src/dotnet/ShellShim/EnvironmentPathFactory.cs index 13123fe62..7a2b493e7 100644 --- a/src/dotnet/ShellShim/EnvironmentPathFactory.cs +++ b/src/dotnet/ShellShim/EnvironmentPathFactory.cs @@ -14,15 +14,9 @@ namespace Microsoft.DotNet.ShellShim internal static class EnvironmentPathFactory { public static IEnvironmentPath CreateEnvironmentPath( - CliFolderPathCalculator cliFolderPathCalculator = null, bool hasSuperUserAccess = false, IEnvironmentProvider environmentProvider = null) { - if (cliFolderPathCalculator == null) - { - cliFolderPathCalculator = new CliFolderPathCalculator(); - } - if (environmentProvider == null) { environmentProvider = new EnvironmentProvider(); @@ -32,14 +26,14 @@ namespace Microsoft.DotNet.ShellShim if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { environmentPath = new WindowsEnvironmentPath( - cliFolderPathCalculator.ToolsShimPath, + CliFolderPathCalculator.ToolsShimPath, Reporter.Output, environmentProvider); } else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && hasSuperUserAccess) { environmentPath = new LinuxEnvironmentPath( - cliFolderPathCalculator.ToolsShimPathInUnix, + CliFolderPathCalculator.ToolsShimPathInUnix, Reporter.Output, environmentProvider, new FileWrapper()); @@ -47,7 +41,7 @@ namespace Microsoft.DotNet.ShellShim else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) && hasSuperUserAccess) { environmentPath = new OSXEnvironmentPath( - executablePath: cliFolderPathCalculator.ToolsShimPathInUnix, + executablePath: CliFolderPathCalculator.ToolsShimPathInUnix, reporter: Reporter.Output, environmentProvider: environmentProvider, fileSystem: new FileWrapper()); @@ -57,10 +51,9 @@ namespace Microsoft.DotNet.ShellShim } public static IEnvironmentPathInstruction CreateEnvironmentPathInstruction( - CliFolderPathCalculator cliFolderPathCalculator = null, IEnvironmentProvider environmentProvider = null) { - return CreateEnvironmentPath(cliFolderPathCalculator, true, environmentProvider); + return CreateEnvironmentPath(true, environmentProvider); } } } diff --git a/src/dotnet/ShellShim/ShellShimRepositoryFactory.cs b/src/dotnet/ShellShim/ShellShimRepositoryFactory.cs index fe3bdcd60..d84874984 100644 --- a/src/dotnet/ShellShim/ShellShimRepositoryFactory.cs +++ b/src/dotnet/ShellShim/ShellShimRepositoryFactory.cs @@ -15,8 +15,7 @@ namespace Microsoft.DotNet.ShellShim private static DirectoryPath GetShimLocation() { - var cliFolderPathCalculator = new CliFolderPathCalculator(); - return new DirectoryPath(cliFolderPathCalculator.ToolsShimPath); + return new DirectoryPath(CliFolderPathCalculator.ToolsShimPath); } } } diff --git a/src/dotnet/Telemetry/TelemetryCommonProperties.cs b/src/dotnet/Telemetry/TelemetryCommonProperties.cs index a37cd70ef..b233066d0 100644 --- a/src/dotnet/Telemetry/TelemetryCommonProperties.cs +++ b/src/dotnet/Telemetry/TelemetryCommonProperties.cs @@ -30,7 +30,7 @@ namespace Microsoft.DotNet.Cli.Telemetry _hasher = hasher ?? Sha256Hasher.Hash; _getMACAddress = getMACAddress ?? MacAddressGetter.GetMacAddress; _dockerContainerDetector = dockerContainerDetector ?? new DockerContainerDetectorForTelemetry(); - _userLevelCacheWriter = userLevelCacheWriter ?? new UserLevelCacheWriter(new CliFolderPathCalculator()); + _userLevelCacheWriter = userLevelCacheWriter ?? new UserLevelCacheWriter(); } private readonly IDockerContainerDetector _dockerContainerDetector; diff --git a/src/dotnet/ToolPackage/ToolPackageFactory.cs b/src/dotnet/ToolPackage/ToolPackageFactory.cs index 49be4af40..51f342fb9 100644 --- a/src/dotnet/ToolPackage/ToolPackageFactory.cs +++ b/src/dotnet/ToolPackage/ToolPackageFactory.cs @@ -34,8 +34,7 @@ namespace Microsoft.DotNet.ToolPackage private static DirectoryPath GetPackageLocation() { - var cliFolderPathCalculator = new CliFolderPathCalculator(); - return new DirectoryPath(cliFolderPathCalculator.ToolsPackagePath); + return new DirectoryPath(CliFolderPathCalculator.ToolsPackagePath); } } } diff --git a/src/dotnet/ToolPackage/ToolPackageInstaller.cs b/src/dotnet/ToolPackage/ToolPackageInstaller.cs index c7df5f18a..aa63ae8c7 100644 --- a/src/dotnet/ToolPackage/ToolPackageInstaller.cs +++ b/src/dotnet/ToolPackage/ToolPackageInstaller.cs @@ -28,7 +28,7 @@ namespace Microsoft.DotNet.ToolPackage _store = store ?? throw new ArgumentNullException(nameof(store)); _projectRestorer = projectRestorer ?? throw new ArgumentNullException(nameof(projectRestorer)); _tempProject = tempProject; - _offlineFeed = offlineFeed ?? new DirectoryPath(new CliFolderPathCalculator().CliFallbackFolderPath); + _offlineFeed = offlineFeed ?? new DirectoryPath(CliFolderPathCalculator.CliFallbackFolderPath); } public IToolPackage InstallPackage(PackageId packageId, diff --git a/src/dotnet/commands/dotnet-msbuild/MSBuildLogger.cs b/src/dotnet/commands/dotnet-msbuild/MSBuildLogger.cs index b6340265f..b22eb9b60 100644 --- a/src/dotnet/commands/dotnet-msbuild/MSBuildLogger.cs +++ b/src/dotnet/commands/dotnet-msbuild/MSBuildLogger.cs @@ -14,7 +14,7 @@ namespace Microsoft.DotNet.Tools.MSBuild public sealed class MSBuildLogger : INodeLogger { private readonly IFirstTimeUseNoticeSentinel _sentinel = - new FirstTimeUseNoticeSentinel(new CliFolderPathCalculator()); + new FirstTimeUseNoticeSentinel(); private readonly ITelemetry _telemetry; private const string NewEventName = "msbuild"; private const string TargetFrameworkTelemetryEventName = "targetframeworkeval"; diff --git a/src/dotnet/commands/dotnet-new/NewCommandShim.cs b/src/dotnet/commands/dotnet-new/NewCommandShim.cs index b01f3c143..c7a8654ac 100644 --- a/src/dotnet/commands/dotnet-new/NewCommandShim.cs +++ b/src/dotnet/commands/dotnet-new/NewCommandShim.cs @@ -31,8 +31,7 @@ namespace Microsoft.DotNet.Tools.New { var sessionId = Environment.GetEnvironmentVariable(MSBuildForwardingApp.TelemetrySessionIdEnvironmentVariableName); - var telemetry = - new Telemetry(new FirstTimeUseNoticeSentinel(new CliFolderPathCalculator()), sessionId); + var telemetry = new Telemetry(new FirstTimeUseNoticeSentinel(), sessionId); var logger = new TelemetryLogger(null); if (telemetry.Enabled) diff --git a/src/dotnet/commands/dotnet-tool/install/ToolInstallCommand.cs b/src/dotnet/commands/dotnet-tool/install/ToolInstallCommand.cs index 5dc206445..40222c090 100644 --- a/src/dotnet/commands/dotnet-tool/install/ToolInstallCommand.cs +++ b/src/dotnet/commands/dotnet-tool/install/ToolInstallCommand.cs @@ -60,8 +60,6 @@ namespace Microsoft.DotNet.Tools.Tool.Install _verbosity = appliedCommand.SingleArgumentOrDefault("verbosity"); _toolPath = appliedCommand.SingleArgumentOrDefault("tool-path"); - var cliFolderPathCalculator = new CliFolderPathCalculator(); - _createToolPackageStoreAndInstaller = createToolPackageStoreAndInstaller ?? ToolPackageFactory.CreateToolPackageStoreAndInstaller; _environmentPathInstruction = environmentPathInstruction diff --git a/src/dotnet/commands/dotnet-tool/uninstall/ToolUninstallCommand.cs b/src/dotnet/commands/dotnet-tool/uninstall/ToolUninstallCommand.cs index a559a644f..2b470b4ff 100644 --- a/src/dotnet/commands/dotnet-tool/uninstall/ToolUninstallCommand.cs +++ b/src/dotnet/commands/dotnet-tool/uninstall/ToolUninstallCommand.cs @@ -34,8 +34,6 @@ namespace Microsoft.DotNet.Tools.Tool.Uninstall IReporter reporter = null) : base(result) { - var pathCalculator = new CliFolderPathCalculator(); - _options = options ?? throw new ArgumentNullException(nameof(options)); _reporter = reporter ?? Reporter.Output; _errorReporter = reporter ?? Reporter.Error; diff --git a/test/Microsoft.DotNet.Configurer.UnitTests/GivenANuGetCachePrimer.cs b/test/Microsoft.DotNet.Configurer.UnitTests/GivenANuGetCachePrimer.cs index 106afadac..1b095bb03 100644 --- a/test/Microsoft.DotNet.Configurer.UnitTests/GivenANuGetCachePrimer.cs +++ b/test/Microsoft.DotNet.Configurer.UnitTests/GivenANuGetCachePrimer.cs @@ -26,7 +26,6 @@ namespace Microsoft.DotNet.Configurer.UnitTests private Mock _nugetPackagesArchiverMock; private Mock _nugetCacheSentinel; - private CliFolderPathCalculator _cliFolderPathCalculator; public GivenANuGetCachePrimer() { @@ -40,12 +39,9 @@ namespace Microsoft.DotNet.Configurer.UnitTests _nugetCacheSentinel = new Mock(); - _cliFolderPathCalculator = new CliFolderPathCalculator(); - var nugetCachePrimer = new NuGetCachePrimer( _nugetPackagesArchiverMock.Object, _nugetCacheSentinel.Object, - _cliFolderPathCalculator, _fileSystemMock.File); nugetCachePrimer.PrimeCache(); @@ -63,7 +59,6 @@ namespace Microsoft.DotNet.Configurer.UnitTests var nugetCachePrimer = new NuGetCachePrimer( nugetPackagesArchiverMock.Object, _nugetCacheSentinel.Object, - _cliFolderPathCalculator, fileSystemMock.File); nugetCachePrimer.PrimeCache(); @@ -75,7 +70,7 @@ namespace Microsoft.DotNet.Configurer.UnitTests public void It_extracts_the_archive_to_the_fallback_folder() { _nugetPackagesArchiverMock.Verify(n => - n.ExtractArchive(_cliFolderPathCalculator.CliFallbackFolderPath), + n.ExtractArchive(CliFolderPathCalculator.CliFallbackFolderPath), Times.Exactly(1)); } @@ -95,7 +90,6 @@ namespace Microsoft.DotNet.Configurer.UnitTests var nugetCachePrimer = new NuGetCachePrimer( nugetPackagesArchiveMock.Object, nugetCacheSentinel.Object, - _cliFolderPathCalculator, _fileSystemMock.File); Action action = () => nugetCachePrimer.PrimeCache(); diff --git a/test/Microsoft.DotNet.Configurer.UnitTests/GivenAPathCalculator.cs b/test/Microsoft.DotNet.Configurer.UnitTests/GivenAPathCalculator.cs index a4d6eb558..af6d8fd19 100644 --- a/test/Microsoft.DotNet.Configurer.UnitTests/GivenAPathCalculator.cs +++ b/test/Microsoft.DotNet.Configurer.UnitTests/GivenAPathCalculator.cs @@ -15,9 +15,8 @@ namespace Microsoft.DotNet.Configurer.UnitTests public void It_does_not_return_same_path_for_tools_package_and_tool_shim() { // shim name will conflict with the folder that is PackageId, if commandName and packageId are the same. - var cliFolderPathCalculator = new CliFolderPathCalculator(); - cliFolderPathCalculator.ToolsPackagePath.Should().NotBe(cliFolderPathCalculator.ToolsShimPath); - cliFolderPathCalculator.ToolsPackagePath.Should().NotBe(cliFolderPathCalculator.ToolsShimPathInUnix.Path); + CliFolderPathCalculator.ToolsPackagePath.Should().NotBe(CliFolderPathCalculator.ToolsShimPath); + CliFolderPathCalculator.ToolsPackagePath.Should().NotBe(CliFolderPathCalculator.ToolsShimPathInUnix.Path); } } } diff --git a/test/dotnet.Tests/GivenThatTheUserIsRunningDotNetForTheFirstTime.cs b/test/dotnet.Tests/GivenThatTheUserIsRunningDotNetForTheFirstTime.cs index b554d528e..103f543e1 100644 --- a/test/dotnet.Tests/GivenThatTheUserIsRunningDotNetForTheFirstTime.cs +++ b/test/dotnet.Tests/GivenThatTheUserIsRunningDotNetForTheFirstTime.cs @@ -213,7 +213,7 @@ namespace Microsoft.DotNet.Tests File.Exists(profiled).Should().BeTrue(); File.ReadAllText(profiled).Should().Be( - $"export PATH=\"$PATH:{new CliFolderPathCalculator().ToolsShimPathInUnix.PathWithDollar}\""); + $"export PATH=\"$PATH:{CliFolderPathCalculator.ToolsShimPathInUnix.PathWithDollar}\""); } [MacOsOnlyFact] @@ -234,7 +234,7 @@ namespace Microsoft.DotNet.Tests command.ExecuteWithCapturedOutput("internal-reportinstallsuccess test").Should().Pass(); File.Exists(pathsd).Should().BeTrue(); - File.ReadAllText(pathsd).Should().Be(new CliFolderPathCalculator().ToolsShimPathInUnix.PathWithTilde); + File.ReadAllText(pathsd).Should().Be(CliFolderPathCalculator.ToolsShimPathInUnix.PathWithTilde); } [Fact]