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

StringAssert

public class StringAssert
Basic Asserts on strings.
public 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)

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 ReferenceEquals(object a, object b)

override the default ReferenceEquals to throw an InvalidOperationException. This implementation makes sure there is no mistake in calling this function as part of Assert.

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.