StringAssert Class

Definition

The string assert.

public ref class StringAssert abstract sealed
public static class StringAssert
type StringAssert = class
Public Class StringAssert
Inheritance
StringAssert

Properties

That

Gets the singleton instance of the CollectionAssert functionality.

Methods

Contains()

Tests whether the specified string contains the specified substring and throws an exception if the substring does not occur within the test string.

Contains()

Tests whether the specified string contains the specified substring and throws an exception if the substring does not occur within the test string.

Contains()

Tests whether the specified string contains the specified substring and throws an exception if the substring does not occur within the test string.

Contains(String, String, String, Object[])

Tests whether the specified string contains the specified substring and throws an exception if the substring does not occur within the test string.

Contains(String, String, String)

Tests whether the specified string contains the specified substring and throws an exception if the substring does not occur within the test string.

Contains(String, String)

Tests whether the specified string contains the specified substring and throws an exception if the substring does not occur within the test string.

DoesNotMatch(String, Regex, String, Object[])

Tests whether the specified string does not match a regular expression and throws an exception if the string matches the expression.

DoesNotMatch(String, Regex, String)

Tests whether the specified string does not match a regular expression and throws an exception if the string matches the expression.

DoesNotMatch(String, Regex)

Tests whether the specified string does not match a regular expression and throws an exception if the string matches the expression.

EndsWith()

Tests whether the specified string ends with the specified substring and throws an exception if the test string does not end with the substring.

EndsWith(String, String, String, Object[])

Tests whether the specified string ends with the specified substring and throws an exception if the test string does not end with the substring.

EndsWith(String, String, String, StringComparison, Object[])

Tests whether the specified string ends with the specified substring and throws an exception if the test string does not end with the substring.

EndsWith(String, String, String)

Tests whether the specified string ends with the specified substring and throws an exception if the test string does not end with the substring.

EndsWith(String, String, StringComparison)

Tests whether the specified string ends with the specified substring and throws an exception if the test string does not end with the substring.

EndsWith(String, String)

Tests whether the specified string ends with the specified substring and throws an exception if the test string does not end with the substring.

Matches(String, Regex, String, Object[])

Tests whether the specified string matches a regular expression and throws an exception if the string does not match the expression.

Matches(String, Regex, String)

Tests whether the specified string matches a regular expression and throws an exception if the string does not match the expression.

Matches(String, Regex)

Tests whether the specified string matches a regular expression and throws an exception if the string does not match the expression.

StartsWith()

Tests whether the specified string begins with the specified substring and throws an exception if the test string does not start with the substring.

StartsWith()

Tests whether the specified string begins with the specified substring and throws an exception if the test string does not start with the substring.

StartsWith()

Tests whether the specified string begins with the specified substring and throws an exception if the test string does not start with the substring.

StartsWith(String, String, String, Object[])

Tests whether the specified string begins with the specified substring and throws an exception if the test string does not start with the substring.

StartsWith(String, String, String)

Tests whether the specified string begins with the specified substring and throws an exception if the test string does not start with the substring.

StartsWith(String, String)

Tests whether the specified string begins with the specified substring and throws an exception if the test string does not start with the substring.

Applies to