Add NotContainInOrder#1339
Conversation
|
I'm occupied all weekend, but I'll try to have a look at this Monday or Tuesday |
| { | ||
| Guard.ThrowIfArgumentIsNull(unexpected, nameof(unexpected), "Cannot verify absence of ordered containment against a <null> collection."); | ||
|
|
||
| Execute.Assertion |
There was a problem hiding this comment.
If somebody uses an AssertionScope, FailWith will not throw immediately and return a bool
There was a problem hiding this comment.
Does that mean we should also return from the method if subject is null?
There was a problem hiding this comment.
That has nothing to do with my comment. What I meant is that you need to avoid executing the remainder of that method if the first FailWith returns false.
If the subject itself is null, it should also fail the assertion.
There was a problem hiding this comment.
Pushed changes for this case, please check if that does what you expect it to.
…hen the subject is null
jnyrup
left a comment
There was a problem hiding this comment.
Finally I understand what this is about.
Ensuring that the subject does not contain an unexpected subsequence
Yes, that put me off-guard a couple of times as well. |
This PR adds
NotContainInOrderassertion as requested in #318.IMPORTANT
AcceptApiChanges.ps1/AcceptApiChanges.sh.