-
Notifications
You must be signed in to change notification settings - Fork 731
Add assertions for (Buffered)Stream #1543
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
Conversation
Tests/FluentAssertions.Specs/Streams/BufferedStreamAssertionSpecs.cs
Outdated
Show resolved
Hide resolved
jnyrup
left a comment
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.
It was a joy to review this 😍
| .ForCondition(!Subject.CanWrite && Subject.CanRead) | ||
| .FailWith("but it was writable or not readable.") |
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.
Would it make sense to split this into two ForCondition+FailWith such that the error message can specify which condition was not met?
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.
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
|
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... |
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.