Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MockDirectory.Move fails if drive letters are different cases. #104

Closed
ephsiung opened this issue Feb 1, 2015 · 0 comments
Closed

MockDirectory.Move fails if drive letters are different cases. #104

ephsiung opened this issue Feb 1, 2015 · 0 comments
Assignees

Comments

@ephsiung
Copy link

ephsiung commented Feb 1, 2015

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

@manne manne self-assigned this Feb 3, 2015
@manne manne closed this as completed in 45337a2 Feb 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants