You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MockDirectory.Move() can fail if drive letters are different cases.
The problem can be duplicated with a slight modification of the MockDirectory_Move_ShouldMove() unit test. Simply change
{ XFS.Path(@"A:\folder1\folder2\file2.txt"), new MockFileData("bbb") },
to
{ XFS.Path(@"a:\folder1\folder2\file2.txt"), new MockFileData("bbb") },
And the test now fails with the following exception:
System.IO.IOException : Source and destination path must be different.
at System.IO.Abstractions.TestingHelpers.MockDirectory.Move(String sourceDirName, String destDirName) in MockDirectory.cs: line 300
at System.IO.Abstractions.TestingHelpers.MockDirectory.Move(String sourceDirName, String destDirName) in MockDirectory.cs: line 318
at System.IO.Abstractions.TestingHelpers.MockDirectoryInfo.MoveTo(String destDirName) in MockDirectoryInfo.cs: line 219
at System.IO.Abstractions.TestingHelpers.Tests.MockDirectoryTests.MockDirectory_Move_ShouldMove() in MockDirectoryTests.cs: line 730
The text was updated successfully, but these errors were encountered:
MockDirectory.Move() can fail if drive letters are different cases.
The problem can be duplicated with a slight modification of the MockDirectory_Move_ShouldMove() unit test. Simply change
{ XFS.Path(@"A:\folder1\folder2\file2.txt"), new MockFileData("bbb") },
to
{ XFS.Path(@"a:\folder1\folder2\file2.txt"), new MockFileData("bbb") },
And the test now fails with the following exception:
System.IO.IOException : Source and destination path must be different.
at System.IO.Abstractions.TestingHelpers.MockDirectory.Move(String sourceDirName, String destDirName) in MockDirectory.cs: line 300
at System.IO.Abstractions.TestingHelpers.MockDirectory.Move(String sourceDirName, String destDirName) in MockDirectory.cs: line 318
at System.IO.Abstractions.TestingHelpers.MockDirectoryInfo.MoveTo(String destDirName) in MockDirectoryInfo.cs: line 219
at System.IO.Abstractions.TestingHelpers.Tests.MockDirectoryTests.MockDirectory_Move_ShouldMove() in MockDirectoryTests.cs: line 730
The text was updated successfully, but these errors were encountered: