Skip to content

feat: add Null to MockFileStream to shadow the static Stream.Null field#1025

Merged
mergify[bot] merged 5 commits intoTestableIO:mainfrom
vbreuss:topic/vb/add-null-to-mockfilestream
Aug 22, 2023
Merged

feat: add Null to MockFileStream to shadow the static Stream.Null field#1025
mergify[bot] merged 5 commits intoTestableIO:mainfrom
vbreuss:topic/vb/add-null-to-mockfilestream

Conversation

@vbreuss
Copy link
Copy Markdown
Member

@vbreuss vbreuss commented Aug 21, 2023

Fixes #1009

This is a suggestion based on the workaround by @sheila-stewart.

@vbreuss vbreuss marked this pull request as ready for review August 21, 2023 20:48
@vbreuss vbreuss requested a review from fgreinacher August 22, 2023 04:31
Copy link
Copy Markdown
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.

Cool, simple and intuitive, thanks!

@mergify mergify bot merged commit aebb626 into TestableIO:main Aug 22, 2023
@vbreuss vbreuss deleted the topic/vb/add-null-to-mockfilestream branch August 22, 2023 17:36
vbreuss referenced this pull request in Testably/Testably.Abstractions Aug 22, 2023
…19.2.64 (#370)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[TestableIO.System.IO.Abstractions](https://togithub.com/TestableIO/System.IO.Abstractions)
| nuget | patch | `19.2.61` -> `19.2.64` |

---

### Release Notes

<details>
<summary>TestableIO/System.IO.Abstractions
(TestableIO.System.IO.Abstractions)</summary>

###
[`v19.2.64`](https://togithub.com/TestableIO/System.IO.Abstractions/releases/tag/v19.2.64)

##### What's Changed

- feat: add `Null` to MockFileStream to shadow the static `Stream.Null`
field by [@&#8203;vbreuss](https://togithub.com/vbreuss) in
[https://github.com/TestableIO/System.IO.Abstractions/pull/1025](https://togithub.com/TestableIO/System.IO.Abstractions/pull/1025)

**Full Changelog**:
TestableIO/System.IO.Abstractions@v19.2.63...v19.2.64

###
[`v19.2.63`](https://togithub.com/TestableIO/System.IO.Abstractions/releases/tag/v19.2.63)

#### What's Changed

- refactor: use `CommonExceptions` to create exceptions by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[https://github.com/TestableIO/System.IO.Abstractions/pull/1027](https://togithub.com/TestableIO/System.IO.Abstractions/pull/1027)
- fix: use full path in `Directory.SetCurrentDirectory` by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[https://github.com/TestableIO/System.IO.Abstractions/pull/1028](https://togithub.com/TestableIO/System.IO.Abstractions/pull/1028)

**Full Changelog**:
TestableIO/System.IO.Abstractions@v19.2.61...v19.2.63

</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:eyJjcmVhdGVkSW5WZXIiOiIzNi40My4yIiwidXBkYXRlZEluVmVyIjoiMzYuNDMuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

This is addressed in release v19.2.64.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state: released Issues that are released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IFile.Open(Read) cannot be mocked with NSubstitute anymore due to System.IO.Abstractions.FileSystemStream

3 participants