Table of Contents

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

collection IEnumerable<T>

The collection to be inspected

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

T

The type of the object to be verified