Verifies that a string contains a full or partial match of a regular expression pattern.

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

Syntax

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

Parameters

actualValue
Type: System..::.String
The actual value.
regexPattern
Type: System..::.String
The regular expression pattern.
regexOptions
Type: System.Text.RegularExpressions..::.RegexOptions
The regular expression options.
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.

Remarks

This assertion will fail if the string is null.

Exceptions

ExceptionCondition
Gallio.Framework.Assertions..::.AssertionExceptionThrown if the verification failed unless the current AssertionFailureBehavior indicates otherwise.
System..::.ArgumentNullExceptionThrown if regexPattern is null.

See Also