public void FileDelete_OnDirectoryThrowsUnauthorizedAccessException() { // Arrange var fs = new MockFileSystem(); const string fileName = "c:\\test\\"; fs.CreateDirectory(fileName); // Act fs.DeleteFile(fileName); // Assert Assert.Fail(); }
public void FileDelete_RemovesFile() { // Arrange var fs = new MockFileSystem(); const string fileName = "c:\\test\\file1.txt"; fs.AddFile(fileName, 255); // Act fs.DeleteFile(fileName); // Assert Assert.IsFalse(fs.FileExists(fileName)); }
public void FileDelete_DeletingNonExistantFileDoesNotFail() { // Arrange var fs = new MockFileSystem(); const string fileName = "c:\\test\\Horker.txt"; // Act fs.DeleteFile(fileName); // Assert }