RegexConstraint - jnm2/nunit-docs-wiki GitHub Wiki
RegexConstraint tests that a pattern is matched.
RegexConstraint(string pattern)
Does.Match(string pattern)
Matches(string pattern)
...IgnoreCase
string phrase = "Make your tests fail before passing!"
Assert.That(phrase, Does.Match("Make.*tests.*pass"));
Assert.That(phrase, Does.Not.Match("your.*passing.*tests"));
- Matches may appear only in the body of a constraint expression or when the inherited syntax is used.