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

StringConstraint

public abstract class StringConstraint : Constraint
StringConstraint is the abstract base for constraints that operate on strings. It supports the IgnoreCase modifier for string operations.
protected bool caseInsensitive

Indicates whether tests should be case-insensitive

protected string descriptionText

Description of this constraint

protected string expected

The expected value

public StringConstraint IgnoreCase { get; }

Modify the constraint to ignore case in matching.

protected StringConstraint()

Constructs a StringConstraint without an expected value

protected StringConstraint(string expected)

Constructs a StringConstraint given an expected value

protected abstract bool Matches(string actual)

Test whether the constraint is satisfied by a given string