Substring Constraint
SubstringConstraint
tests for a substring.
Constructor
SubstringConstraint(string expected)
Syntax
Does.Contain(string expected)
Modifiers
...IgnoreCase
Examples of Use
[Test]
public void StringConstraint_Examples()
{
Assert.That("Hello World!", Does.StartWith("Hello"));
Assert.That("Hello World!", Does.EndWith("World!"));
Assert.That("Hello World!", Does.Contain("lo Wor"));
Assert.That("Hello World!", Does.Match("H.*!"));
}