A colleague asked me to take a look at the following code inside a test project:
My first guess would be that this code checks that the specified condition(the contains) is true for every element in the list.
This turns out not to be the case. The Assert.Collection expects a list of element inspectors, one for every item in the list. The first inspector is used to check the first item, the second inspector the second item and so on. The number of inspectors should match the number of elements in the list.
An example:
The behavior I expected could be achieved using the Assert.All method: