Verifies that a string contains some expected value.

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

Syntax

C#
public static void Contains(
	string actualValue,
	string expectedSubstring
)
Visual Basic (Declaration)
Public Shared Sub Contains ( _
	actualValue As String, _
	expectedSubstring As String _
)

Parameters

actualValue
Type: System..::.String
The actual value.
expectedSubstring
Type: System..::.String
The expected substring.

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 expectedSubstring is null.

See Also