-
Notifications
You must be signed in to change notification settings - Fork 257
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
feat: add testability for DriveInfo
#1094
Conversation
6a5ca41
to
9030f59
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @FantasyTeddy.
The overall implementation looks quite neat; I have only a few minor comments.
src/TestableIO.System.IO.Abstractions.TestingHelpers/MockFileSystem.cs
Outdated
Show resolved
Hide resolved
src/TestableIO.System.IO.Abstractions.TestingHelpers/MockFileSystem.cs
Outdated
Show resolved
Hide resolved
tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/MockDriveInfoTests.cs
Outdated
Show resolved
Hide resolved
Just to clarify: You did not implement any behaviour of the mocked drive, right? I mean, you can now mock the DriveInfo by providing explicit values, but they don't affect the other functionality in the |
You are correct of course. I changed my wording to hopefully prevent confusion. |
This is addressed in release v20.0.28. |
…20.0.28 (#475) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [TestableIO.System.IO.Abstractions](https://togithub.com/TestableIO/System.IO.Abstractions) | `20.0.15` -> `20.0.28` | [![age](https://developer.mend.io/api/mc/badges/age/nuget/TestableIO.System.IO.Abstractions/20.0.28?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/nuget/TestableIO.System.IO.Abstractions/20.0.28?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/nuget/TestableIO.System.IO.Abstractions/20.0.15/20.0.28?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/nuget/TestableIO.System.IO.Abstractions/20.0.15/20.0.28?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>TestableIO/System.IO.Abstractions (TestableIO.System.IO.Abstractions)</summary> ### [`v20.0.28`](https://togithub.com/TestableIO/System.IO.Abstractions/releases/tag/v20.0.28) ##### What's Changed - chore(deps): update dotnet/nbgv action to v0.4.2 by [@​renovate](https://togithub.com/renovate) in [https://github.com/TestableIO/System.IO.Abstractions/pull/1082](https://togithub.com/TestableIO/System.IO.Abstractions/pull/1082) - chore(deps): update dependency nunit.analyzers to v4 by [@​renovate](https://togithub.com/renovate) in [https://github.com/TestableIO/System.IO.Abstractions/pull/1083](https://togithub.com/TestableIO/System.IO.Abstractions/pull/1083) - chore(deps): update dependency nunit.analyzers to v4.0.1 by [@​renovate](https://togithub.com/renovate) in [https://github.com/TestableIO/System.IO.Abstractions/pull/1084](https://togithub.com/TestableIO/System.IO.Abstractions/pull/1084) - chore(deps): update danielpalme/reportgenerator-github-action action to v5.2.1 by [@​renovate](https://togithub.com/renovate) in [https://github.com/TestableIO/System.IO.Abstractions/pull/1085](https://togithub.com/TestableIO/System.IO.Abstractions/pull/1085) - chore(deps): update dependency microsoft.net.test.sdk to v17.9.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/TestableIO/System.IO.Abstractions/pull/1086](https://togithub.com/TestableIO/System.IO.Abstractions/pull/1086) - chore(deps): update dependency saucecontrol.inheritdoc to v2.0.1 by [@​renovate](https://togithub.com/renovate) in [https://github.com/TestableIO/System.IO.Abstractions/pull/1087](https://togithub.com/TestableIO/System.IO.Abstractions/pull/1087) - chore(deps): update dependency dotnet-sdk to v8.0.200 by [@​renovate](https://togithub.com/renovate) in [https://github.com/TestableIO/System.IO.Abstractions/pull/1088](https://togithub.com/TestableIO/System.IO.Abstractions/pull/1088) - chore(deps): update dependency dotnet-sdk to v8.0.201 by [@​renovate](https://togithub.com/renovate) in [https://github.com/TestableIO/System.IO.Abstractions/pull/1089](https://togithub.com/TestableIO/System.IO.Abstractions/pull/1089) - chore(deps): update dependency coverlet.collector to v6.0.1 by [@​renovate](https://togithub.com/renovate) in [https://github.com/TestableIO/System.IO.Abstractions/pull/1090](https://togithub.com/TestableIO/System.IO.Abstractions/pull/1090) - chore(deps): update danielpalme/reportgenerator-github-action action to v5.2.2 by [@​renovate](https://togithub.com/renovate) in [https://github.com/TestableIO/System.IO.Abstractions/pull/1092](https://togithub.com/TestableIO/System.IO.Abstractions/pull/1092) - chore(deps): update dependency nunit to v4.1.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/TestableIO/System.IO.Abstractions/pull/1093](https://togithub.com/TestableIO/System.IO.Abstractions/pull/1093) - chore(deps): update softprops/action-gh-release action to v2 by [@​renovate](https://togithub.com/renovate) in [https://github.com/TestableIO/System.IO.Abstractions/pull/1095](https://togithub.com/TestableIO/System.IO.Abstractions/pull/1095) - feat: add testability for `DriveInfo` by [@​FantasyTeddy](https://togithub.com/FantasyTeddy) in [https://github.com/TestableIO/System.IO.Abstractions/pull/1094](https://togithub.com/TestableIO/System.IO.Abstractions/pull/1094) ##### New Contributors - [@​FantasyTeddy](https://togithub.com/FantasyTeddy) made their first contribution in [https://github.com/TestableIO/System.IO.Abstractions/pull/1094](https://togithub.com/TestableIO/System.IO.Abstractions/pull/1094) **Full Changelog**: TestableIO/System.IO.Abstractions@v20.0.15...v20.0.28 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/Testably/Testably.Abstractions). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMzAuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIzMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Fixes #826
This adds the possibility to add drives to the
MockFileSystem
together with aMockDriveData
that can be used to configure the various properties of the drive (free space, type, etc.).