public void Folder_Does_Not_Exists_For_Deletion() { var path = @"C:\SourceFiles\file.txt"; var mockFileSystem = new MockFileSystem(); var sut = new FolderManager(mockFileSystem); Assert.That(() => sut.DeleteFolder(path), Throws.TypeOf <ArgumentException>()); }
public void Successfully_Folder_Deletion() { var path = @"C:\SourceFiles\file.txt"; var mockFileSystem = new MockFileSystem(); mockFileSystem.AddDirectory(path); var sut = new FolderManager(mockFileSystem); sut.DeleteFolder(path); Assert.That(mockFileSystem.Directory.Exists(path), Is.False); }