How to check that each object of a collection conforms to a given predicate? E.g.: check for each item (from a given collection) that it matches a given predicate (MyPredicate
). Code should probably look something like this:
collection.Should().AllMatch(item => MyPredicate(item));
Is something like that available or do I have to write it myself?