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

Return original path #406

Merged
merged 12 commits into from
Dec 3, 2018
Merged

Return original path #406

merged 12 commits into from
Dec 3, 2018

Conversation

updateaman
Copy link
Contributor

To fix issue #400
Return original directory path passed by the user from MockDirectoryInfo ToString() method.

Which is what the original directoryInfo class does:
https://github.com/dotnet/corefx/blob/master/src/System.IO.FileSystem/src/System/IO/DirectoryInfo.cs

@fgreinacher
Copy link
Contributor

Thanks for working on this @updateaman - the changes look good so far. Could you additionally check if we have the same inconsistency for FileInfo and DriveInfo?

@updateaman
Copy link
Contributor Author

@fgreinacher yes, they had the same problem with ToString(). I've fixed them and added tests

Copy link
Contributor

@fgreinacher fgreinacher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments around backwards compatibility. Will merge as soon as those are addressed.

Thanks in advance!

System.IO.Abstractions/DriveInfoBase.cs Outdated Show resolved Hide resolved
System.IO.Abstractions/DirectoryInfoBase.cs Outdated Show resolved Hide resolved
System.IO.Abstractions/FileInfoBase.cs Outdated Show resolved Hide resolved
System.IO.Abstractions/FileSystemInfoBase.cs Outdated Show resolved Hide resolved
@fgreinacher
Copy link
Contributor

LGTM, thanks again @updateaman!

@fgreinacher fgreinacher merged commit c0da0c0 into TestableIO:master Dec 3, 2018
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

Successfully merging this pull request may close these issues.

2 participants