Table of Contents

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

collection IEnumerable<T>

The collection to be inspected

elementInspectors Func<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

Task

Type Parameters

T

The type of the object to be verified