From c843b47d6233153fa961c6d0e61edf7cedf255bb Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 8 Nov 2022 14:58:05 -0800 Subject: Separate WixInternal content from official WixToolset namespace --- .../TestDataFolderFileSystem.cs | 42 ---------------------- 1 file changed, 42 deletions(-) delete mode 100644 src/internal/WixBuildTools.TestSupport/TestDataFolderFileSystem.cs (limited to 'src/internal/WixBuildTools.TestSupport/TestDataFolderFileSystem.cs') diff --git a/src/internal/WixBuildTools.TestSupport/TestDataFolderFileSystem.cs b/src/internal/WixBuildTools.TestSupport/TestDataFolderFileSystem.cs deleted file mode 100644 index 15b7631d..00000000 --- a/src/internal/WixBuildTools.TestSupport/TestDataFolderFileSystem.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixBuildTools.TestSupport -{ - using System; - - /// - /// This class builds on top of DisposableFileSystem - /// to make it easy to write a test that needs a whole folder of test data copied to a temp location - /// that will automatically be cleaned up at the end of the test. - /// - public class TestDataFolderFileSystem : IDisposable - { - private DisposableFileSystem fileSystem; - - public string BaseFolder { get; private set; } - - public void Dispose() - { - this.fileSystem?.Dispose(); - } - - public void Initialize(string sourceDirectoryPath) - { - if (this.fileSystem != null) - { - throw new InvalidOperationException(); - } - this.fileSystem = new DisposableFileSystem(); - - this.BaseFolder = this.fileSystem.GetFolder(); - - RobocopyFolder(sourceDirectoryPath, this.BaseFolder); - } - - public static ExternalExecutableResult RobocopyFolder(string sourceFolderPath, string destinationFolderPath) - { - var args = $"\"{sourceFolderPath}\" \"{destinationFolderPath}\" /E /R:1 /W:1"; - return RobocopyRunner.Execute(args); - } - } -} -- cgit v1.2.3-55-g6feb