Verifies that all the elements of the sequence meet the specified condition.

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

Syntax

C#
public static void ForAll<T>(
	IEnumerable<T> values,
	Predicate<T> predicate,
	string messageFormat,
	params Object[] messageArgs
)
Visual Basic (Declaration)
Public Shared Sub ForAll(Of T) ( _
	values As IEnumerable(Of T), _
	predicate As Predicate(Of T), _
	messageFormat As String, _
	ParamArray messageArgs As Object() _
)

Parameters

values
Type: System.Collections.Generic..::.IEnumerable<(Of <(T>)>)
The sequence of values to evaluate.
predicate
Type: System..::.Predicate<(Of <(T>)>)
The condition that must be fulfilled (returns true) by all the elements of the sequence.
messageFormat
Type: System..::.String
The custom assertion message format, or null if none.
messageArgs
Type: array< System..::.Object >[]()[]
The custom assertion message arguments, or null if none.

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