StringAssert Methods

Include Protected Members
Include Inherited Members

Methods

  Name Description
Public methodStatic member Contains(String, String) Verifies that the first string contains the second string. This method is case sensitive.
Public methodStatic member Contains(String, String, String) Verifies that the first string contains the second string. Displays a message if the assertion fails. This method is case sensitive.
Public methodStatic member Contains(String, String, String, array<Object[]) Verifies that the first string contains the second string. Displays a message if the assertion fails, and applies the specified formatting to it. This method is case sensitive.
Public methodStatic member DoesNotMatch(String, Regex) Verifies that the specified string does not match the regular expression.
Public methodStatic member DoesNotMatch(String, Regex, String) Verifies that the specified string does not match the regular expression. Displays a message if the assertion fails.
Public methodStatic member DoesNotMatch(String, Regex, String, array<Object[]) Verifies that the specified string does not match the regular expression. Displays a message if the assertion fails, and applies the specified formatting to it.
Public methodStatic member EndsWith(String, String) Verifies that the first string ends with the second string. This method is case sensitive.
Public methodStatic member EndsWith(String, String, String) Verifies that the first string ends with the second string. Displays a message if the assertion fails. This method is case sensitive.
Public methodStatic member EndsWith(String, String, String, array<Object[]) Verifies that the first string ends with the second string. Displays a message if the assertion fails, and applies the specified formatting to it. This method is case sensitive.
Public methodStatic member Matches(String, Regex) Verifies that the specified string matches the regular expression.
Public methodStatic member Matches(String, Regex, String) Verifies that the specified string matches the regular expression. Displays a message if the assertion fails.
Public methodStatic member Matches(String, Regex, String, array<Object[]) Verifies that the specified string matches the regular expression. Displays a message if the assertion fails, and applies the specified formatting to it.
Public methodStatic member StartsWith(String, String) Verifies that the first string begins with the second string. This method is case sensitive.
Public methodStatic member StartsWith(String, String, String) Verifies that the first string begins with the second string. Displays a message if the assertion fails. This method is case sensitive.
Public methodStatic member StartsWith(String, String, String, array<Object[]) Verifies that the first string begins with the second string. Displays a message if the assertion fails, and applies the specified formatting to it. This method is case sensitive.

Top

See Also

Reference

StringAssert Class

Microsoft.VisualStudio.TestTools.UnitTesting Namespace