Skip to content

StringAssertions.NotMatch Method ​

Definition ​

Asserts that the string does not match the specified regular expression pattern.

c#
public AssertionsChain<StringAssertions, string> NotMatch(string pattern);

View source

Parameters ​

NameTypeDescription
patternStringThe regular expression pattern the string should not match.

Returns ​

AssertionsChain<StringAssertions, String>

An AssertionsChain<TAssertions, T> for chaining further assertions.