This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions | |
| Enable-RemoteDesktop | |
| choco install vmware-tools -y | |
| choco install google-chrome-x64 -y | |
| choco install git-tf -y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [TestFixture] | |
| public class FileCopierTests | |
| { | |
| [Test] | |
| public void CopyFile_SourceFileExistsDestinationDirDoesNotExist_DestinationFileCopied() | |
| { | |
| // Arrange | |
| var mockFileSystem = new MockFileSystem(); | |
| mockFileSystem.AddFile(@"c:\file.txt", MockFileData.NullObject); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace System.IO.Abstractions.TestingHelpers | |
| { | |
| [Serializable] | |
| public class MockFileSystem : IFileSystem, IMockFileDataAccessor | |
| { | |
| #region Implementation of IFileSystem | |
| #endregion | |
| public IEnumerable<string> AllPaths |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.IO.Abstractions; | |
| public class CleanFileCopier | |
| { | |
| private readonly IFileSystem _fileSystem; | |
| public CleanFileCopier(): this(new FileSystem()) | |
| { | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace System.IO.Abstractions | |
| { | |
| public interface IFileSystem | |
| { | |
| FileBase File { get; } | |
| DirectoryBase Directory { get; } | |
| IFileInfoFactory FileInfo { get; } | |
| PathBase Path { get; } | |
| IDirectoryInfoFactory DirectoryInfo { get; } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.IO; | |
| public class LegacyFileCopier | |
| { | |
| public void CopyFile(string sourceFilePath, string destinationDirectoryPath) | |
| { | |
| if (!Directory.Exists(destinationDirectoryPath)) | |
| { | |
| Directory.CreateDirectory(destinationDirectoryPath); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.IO.Abstractions; | |
| public class CleanFileCopier | |
| { | |
| private readonly IFileSystem _fileSystem; | |
| public CleanFileCopier(): this(new FileSystem()) | |
| { | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| djsjfk | |
| fkdkfldkl | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Windows.Forms; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Diagnostics; | |
| class Script | |
| { | |
| static public void Main(string[] args) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static class Program | |
| { | |
| private static void Main(string[] args) | |
| { | |
| AttachConsole(-1); | |
| Console.WriteLine(); | |
| // Rest of your code | |
| } | |