Describe the bug
MockFileSystem throws an System.ArgumentException ("The path is not of a legal form") when a empty string is passed to the File.Exists() method.
System.IO.File.Exists(string.Empty) returns false.
To Reproduce
Steps to reproduce the behavior:
[Test]
public void MockFile_Exists_ShouldReturnFalseForEmptyString()
{
// Arrange
var fileSystem = new MockFileSystem();
// Act
var result = fileSystem.File.Exists(string.Empty);
// Assert
Assert.IsFalse(result);
}
Expected behavior
fileSystem.File.Exists() should return false and behave like System.IO.File.Exists()
Describe the bug
MockFileSystem throws an System.ArgumentException ("The path is not of a legal form") when a empty string is passed to the File.Exists() method.
System.IO.File.Exists(string.Empty) returns false.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
fileSystem.File.Exists() should return false and behave like System.IO.File.Exists()