Verifies that all the elements of the sequence pass the validation.

Namespace:  MbUnit.Framework
Assembly:  MbUnit (in MbUnit.dll) Version: 3.3.0.0 (3.3.459.0)

Syntax

C#
public static void ForAll<T>(
	IEnumerable<T> values,
	Action<T, int> action
)
Visual Basic (Declaration)
Public Shared Sub ForAll(Of T) ( _
	values As IEnumerable(Of T), _
	action As Action(Of T, Integer) _
)

Parameters

values
Type: System.Collections.Generic..::.IEnumerable<(Of <(T>)>)
The sequence of values to evaluate.
action
Type: Gallio.Common..::.Action<(Of <(T, Int32>)>)
The assertion block that validates each element of the sequence based on the element's value and index.

Type Parameters

T
The type of values in the sequence.

Exceptions

ExceptionCondition
Gallio.Framework.Assertions..::.AssertionExceptionThrown if the verification failed unless the current AssertionFailureBehavior indicates otherwise.

See Also