Signals an unconditional assertion failure with a particular message.

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

Syntax

C#
public static void Fail(
	string messageFormat,
	params Object[] messageArgs
)
Visual Basic (Declaration)
Public Shared Sub Fail ( _
	messageFormat As String, _
	ParamArray messageArgs As Object() _
)

Parameters

messageFormat
Type: System..::.String
The format of the assertion failure message.
messageArgs
Type: array< System..::.Object >[]()[]
The arguments for the assertion failure message format string.

Remarks

Use Verify(Func<(Of <(AssertionFailure>)>)) and Fail(AssertionFailure) instead when implementing custom assertions.

Exceptions

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

See Also