I don't agree with this. It's still true that an empty collection only contains elements matching a given criterion.
An example:
I wrote a test to verify that a method that transformed a collection of elements did not add any elements. The assertion was along the lines of "result.Should().OnlyContain(item => originalItems.Contains(item))".
If you won't change the behaviour, I think you should at least reflect the behaviour in the method's documentation:
An example:
I wrote a test to verify that a method that transformed a collection of elements did not add any elements. The assertion was along the lines of "result.Should().OnlyContain(item => originalItems.Contains(item))".
If you won't change the behaviour, I think you should at least reflect the behaviour in the method's documentation:
Asserts that the collection is not empty and only contains items that match a predicate.