Method CollectionAsync
- Namespace
- Xunit
- Assembly
- xunit.v3.assert.dll
CollectionAsync<T>(IEnumerable<T>, params Func<T, Task>[])
Verifies that a collection contains exactly a given number of elements, which meet the criteria provided by the element inspectors.
public static Task CollectionAsync<T>(IEnumerable<T> collection, params Func<T, Task>[] elementInspectors)
Parameters
collectionIEnumerable<T>The collection to be inspected
elementInspectorsFunc<T, Task>[]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.
Returns
Type Parameters
TThe type of the object to be verified