Add assertions for (Buffered)Stream#1543
Merged
jnyrup merged 2 commits intofluentassertions:developfrom May 8, 2021
eNeRGy164:stream-assertions
Merged
Add assertions for (Buffered)Stream#1543jnyrup merged 2 commits intofluentassertions:developfrom eNeRGy164:stream-assertions
jnyrup merged 2 commits intofluentassertions:developfrom
eNeRGy164:stream-assertions
Conversation
dennisdoomen
reviewed
May 7, 2021
Tests/FluentAssertions.Specs/Streams/BufferedStreamAssertionSpecs.cs
Outdated
Show resolved
Hide resolved
jnyrup
reviewed
May 7, 2021
Comment on lines
+328
to
+329
| .ForCondition(!Subject.CanWrite && Subject.CanRead) | ||
| .FailWith("but it was writable or not readable.") |
Member
There was a problem hiding this comment.
Would it make sense to split this into two ForCondition+FailWith such that the error message can specify which condition was not met?
Contributor
Author
There was a problem hiding this comment.
It was my original intention and also to do it with only one chain, but couldn't get it working. Settled for this version to keep the implementation simple for now.
Will think a bit on this.
Tests/FluentAssertions.Specs/Streams/BufferedStreamAssertionSpecs.cs
Outdated
Show resolved
Hide resolved
* Renamed unit tests * Rewritten some text * Changed some parameters to long * Changed null message to include 'reference' instead of type * Fixed typo * Added because(args) to bufferedstream tests
Member
|
Oh, and I forgot to say that I usually make a comment only once, and expect the author to check the rest of the code for the same symptom... |
dennisdoomen
approved these changes
May 7, 2021
jnyrup
approved these changes
May 8, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added for
Stream[Not]BeWritable[Not]BeSeekable[Not]BeReadable[Not]BeReadOnly[Not]BeWriteOnly[Not]HaveLength[Not]HavePositionAdded for
BufferedStream[Not]HaveBufferSizeIMPORTANT
AcceptApiChanges.ps1/AcceptApiChanges.sh.