Method DoesNotMatch
- Namespace
- Xunit
- Assembly
- xunit.v3.assert.dll
DoesNotMatch(string, string?)
Verifies that a string does not match a regular expression.
public static void DoesNotMatch(string expectedRegexPattern, string? actualString)
Parameters
expectedRegexPatternstringThe regex pattern expected not to match
actualStringstringThe string to be inspected
Exceptions
Thrown when the string matches the regex pattern
DoesNotMatch(Regex, string?)
Verifies that a string does not match a regular expression.
public static void DoesNotMatch(Regex expectedRegex, string? actualString)
Parameters
Exceptions
Thrown when the string matches the regex