public void DeleteDirectory_RemovesEmptyDirectory() { // Arrange var fs = new MockFileSystem(); const string dirName = "c:\\test"; fs.CreateDirectory(dirName); // Act fs.DeleteDirectory(dirName); // Assert Assert.IsFalse(fs.DirectoryExists(dirName)); }
public void DeleteDirectory_RemoveNonEmptyDirectoryThrowsIoException() { // Arrange var fs = new MockFileSystem(); string dirName = "c:\\test"; fs.CreateDirectory(dirName); fs.AddFile(dirName + "\\file1.txt", 100); // Act fs.DeleteDirectory(dirName); // Assert Assert.Fail(); }