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

fix: #736 - MoveTo implementation for MockDirectoryInfo under TestingHelpers #864

Closed
wants to merge 2 commits into from

Conversation

afroze9
Copy link

@afroze9 afroze9 commented Jul 6, 2022

Fix for issue #736.
Made changes to the MockDirectoryInfo under System.IO.Abstractions.TestingHelpers.
MoveTo now updates the directoryName when moving the directory to the destination folder.

This should also fix the following methods (if they are called after MoveTo is called):

  • Delete
  • GetAccessControl
  • GetDirectories
  • SetAccessControl
  • GetMockFileDataForWrite

@afroze9 afroze9 changed the title Fix #736 Fixes MoveTo implementation for MockDirectoryInfo under TestingHelpers Jul 6, 2022
@afroze9 afroze9 changed the title Fixes MoveTo implementation for MockDirectoryInfo under TestingHelpers Fix MoveTo implementation for MockDirectoryInfo under TestingHelpers Jul 6, 2022
@afroze9 afroze9 changed the title Fix MoveTo implementation for MockDirectoryInfo under TestingHelpers fix: #736 - MoveTo implementation for MockDirectoryInfo under TestingHelpers Jul 6, 2022
@fgreinacher fgreinacher self-requested a review July 7, 2022 15:04
@fgreinacher
Copy link
Contributor

Thanks, I'll have a look by by the end of this week!

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.

Thanks a lot for your contribution @afroze9! Please have a look at the failing tests and ping me once they are fixed 🙇

@fgreinacher fgreinacher marked this pull request as draft September 10, 2022 11:51
mergify bot pushed a commit that referenced this pull request Apr 18, 2023
Fixes #736:
> In a unit test which consists on moving directory using the MoveTo function from IDirectoryInfo doesn't update the IDirectoryInfo entries and the moved directory info keeps the same initial values. However using the same function on the debug and release modes( FileSystem) does update the fields and properties of the DirectorytInfo

*Note: This should make #864 obsolete!*
@fgreinacher
Copy link
Contributor

fgreinacher commented Apr 18, 2023

Superseded by #972

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