public void DirectoryExists_GivenFolderDoesNotExist_ShouldReturnTrue() { //---------------Set up test pack------------------- var fileSystemAdapter = new FileSystemAdapter(); //---------------Assert Precondition---------------- //---------------Execute Test ---------------------- var folderExists = fileSystemAdapter.DirectoryExists(Guid.NewGuid().ToString()); //---------------Test Result ----------------------- Assert.IsFalse(folderExists); }
public void DirectoryExists_GivenFolderExists_ShouldReturnTrue() { using (var sandboxPath = new SandboxPath()) { //---------------Set up test pack------------------- var fileSystemAdapter = new FileSystemAdapter(); //---------------Assert Precondition---------------- //---------------Execute Test ---------------------- var folderExists = fileSystemAdapter.DirectoryExists(sandboxPath.FullPath); //---------------Test Result ----------------------- Assert.IsTrue(folderExists); } }
public void CreateDirectory_ShouldCreateDirectory() { using (var sandboxPath = new SandboxPath()) { //---------------Set up test pack------------------- var fileSystemAdapter = new FileSystemAdapter(); //---------------Assert Precondition---------------- //---------------Execute Test ---------------------- var newDirectory = Path.Combine(sandboxPath.FullPath, Guid.NewGuid().ToString()); fileSystemAdapter.CreateDirectory(newDirectory); //---------------Test Result ----------------------- Assert.IsTrue(fileSystemAdapter.DirectoryExists(newDirectory)); } }