public void DeleteDirectoryFail() { var mountfs = new MountFileSystem(); mountfs.Mount("/dir1", new MemoryFileSystem()); Assert.Throws <UnauthorizedAccessException>(() => mountfs.DeleteDirectory("/dir1", true)); Assert.Throws <UnauthorizedAccessException>(() => mountfs.DeleteDirectory("/dir1", false)); Assert.Throws <DirectoryNotFoundException>(() => mountfs.DeleteDirectory("/dir2", false)); }