-
Notifications
You must be signed in to change notification settings - Fork 267
Closed
Labels
state: in workIssues that are currently worked onIssues that are currently worked ontype: bugIssues that describe misbehaving functionalityIssues that describe misbehaving functionality
Description
This unit test fails:
[TestMethod]
public void TestFileNotFoundExceptionContent() {
var expectedMsg = "";
var expectedFileName = "";
var actualMsg = "";
var actualFileName = "";
var absentFileNameFullPath = @"c:\you surely don't have such file.hope-so";
try {
File.ReadAllText(absentFileNameFullPath);
} catch (FileNotFoundException e) {
expectedMsg = e.Message;
expectedFileName = e.FileName;
}
try {
_fileSystemMock.File.ReadAllText(absentFileNameFullPath);
} catch (FileNotFoundException e) {
actualMsg = e.Message;
actualFileName = e.FileName;
}
// Expected: @"Could not find file 'c:\you surely don't have such file.hope-so'."
// Actual: @"Can't find c:\you surely don't have such file.hope-so"
Assert.AreEqual(expectedMsg, actualMsg);
// Expected: @"c:\you surely don't have such file.hope-so"
// Actual: null
Assert.AreEqual(expectedFileName, actualFileName);
}
Metadata
Metadata
Assignees
Labels
state: in workIssues that are currently worked onIssues that are currently worked ontype: bugIssues that describe misbehaving functionalityIssues that describe misbehaving functionality