Method Collection
- Namespace
- Xunit
- Assembly
- xunit.v3.assert.dll
Collection<T>(IEnumerable<T>, params Action<T>[])
Verifies that a collection contains exactly a given number of elements, which meet the criteria provided by the element inspectors.
public static void Collection<T>(IEnumerable<T> collection, params Action<T>[] elementInspectors)
Parameters
collectionIEnumerable<T>The collection to be inspected
elementInspectorsAction<T>[]The element inspectors, which inspect each element in turn. The total number of element inspectors must exactly match the number of elements in the collection.
Type Parameters
TThe type of the object to be verified