Method All
- Namespace
- Xunit
- Assembly
- xunit.v3.assert.dll
All<T>(IEnumerable<T>, Action<T>)
Verifies that all items in the collection pass when executed against action.
public static void All<T>(IEnumerable<T> collection, Action<T> action)
Parameters
collectionIEnumerable<T>The collection
actionAction<T>The action to test each item against
Type Parameters
TThe type of the object to be verified
Exceptions
Thrown when the collection contains at least one non-matching element
All<T>(IEnumerable<T>, Action<T, int>)
Verifies that all items in the collection pass when executed against action. The item index is provided to the action, in addition to the item.
public static void All<T>(IEnumerable<T> collection, Action<T, int> action)
Parameters
collectionIEnumerable<T>The collection
actionAction<T, int>The action to test each item against
Type Parameters
TThe type of the object to be verified
Exceptions
Thrown when the collection contains at least one non-matching element