<PackageReference Include="NUnit" Version="4.6.0" />

NUnit.Framework.Legacy.StringAssert

public abstract class StringAssert : AssertBase
Basic Asserts on strings.
protected StringAssert()

public static void AreEqualIgnoringCase(string expected, string actual, string message, object[] args)

Asserts that two strings are equal, without regard to case.

public static void AreEqualIgnoringCase(string expected, string actual)

Asserts that two strings are equal, without regard to case.

public static void AreNotEqualIgnoringCase(string expected, string actual, string message, object[] args)

Asserts that two strings are not equal, without regard to case.

public static void AreNotEqualIgnoringCase(string expected, string actual)

Asserts that two strings are not equal, without regard to case.

public static void Contains(string expected, string actual, string message, object[] args)

Asserts that a string is found within another string.

public static void Contains(string expected, string actual)

Asserts that a string is found within another string.

public static void DoesNotContain(string expected, string actual, string message, object[] args)

Asserts that a string is not found within another string.

public static void DoesNotContain(string expected, string actual)

Asserts that a string is found within another string.

public static void DoesNotEndWith(string expected, string actual, string message, object[] args)

Asserts that a string does not end with another string.

public static void DoesNotEndWith(string expected, string actual)

Asserts that a string does not end with another string.

public static void DoesNotMatch(string pattern, string actual, string message, object[] args)

Asserts that a string does not match an expected regular expression pattern.

public static void DoesNotMatch(string pattern, string actual)

Asserts that a string does not match an expected regular expression pattern.

public static void DoesNotStartWith(string expected, string actual, string message, object[] args)

Asserts that a string does not start with another string.

public static void DoesNotStartWith(string expected, string actual)

Asserts that a string does not start with another string.

public static void EndsWith(string expected, string actual, string message, object[] args)

Asserts that a string ends with another string.

public static void EndsWith(string expected, string actual)

Asserts that a string ends with another string.

public static bool Equals(object a, object b)

DO NOT USE! Use StringAssert.AreEqualIgnoringCase(...) or Assert.AreEqual(...) instead. The Equals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function.

public static void IsMatch(string pattern, string actual, string message, object[] args)

Asserts that a string matches an expected regular expression pattern.

public static void IsMatch(string pattern, string actual)

Asserts that a string matches an expected regular expression pattern.

public static void IsNotNullNorEmpty(string actual, string message, object[] args)

Asserts that a string is neither null nor empty.

public static void IsNotNullNorEmpty(string actual)

Asserts that a string is neither null nor empty.

public static void IsNotNullNorWhiteSpace(string actual, string message, object[] args)

Asserts that a string is not null, not empty and does not consist only of white-space characters.

public static void IsNotNullNorWhiteSpace(string actual)

Asserts that a string is not null, not empty and does not consist only of white-space characters.

public static void IsNullOrEmpty(string actual, string message, object[] args)

Asserts that a string is either null or empty.

public static void IsNullOrEmpty(string actual)

Asserts that a string is either null or empty.

public static void IsNullOrWhiteSpace(string actual, string message, object[] args)

Asserts that a string is either null, empty or consists only of white-space characters.

public static void IsNullOrWhiteSpace(string actual)

Asserts that a string is either null, empty or consists only of white-space characters.

public static void ReferenceEquals(object a, object b)

DO NOT USE! The ReferenceEquals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function.

public static void StartsWith(string expected, string actual, string message, object[] args)

Asserts that a string starts with another string.

public static void StartsWith(string expected, string actual)

Asserts that a string starts with another string.