public void Folder_Is_Null_For_Creation() { string path = null; var mockFileSystem = new MockFileSystem(); var sut = new FolderManager(mockFileSystem); Assert.That(() => sut.CreateFolder(path), Throws.TypeOf <ArgumentNullException>()); }
public void Successfully_Folder_Creation() { var path = @"C:\SourceFiles\file.txt"; var mockFileSystem = new MockFileSystem(); var sut = new FolderManager(mockFileSystem); sut.CreateFolder(path); Assert.That(mockFileSystem.Directory.Exists(path), Is.True); }
public void Folder_Has_Been_Already_Exists_For_Creation() { var path = @"C:\SourceFiles\file.txt"; var mockFileSystem = new MockFileSystem(); mockFileSystem.AddDirectory(path); var sut = new FolderManager(mockFileSystem); Assert.That(() => sut.CreateFolder(path), Throws.TypeOf <ArgumentException>()); }