StringAssert.DoesNotMatch Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| DoesNotMatch(String, Regex) |
Tests whether the specified string does not match a regular expression and throws an exception if the string matches the expression. |
| DoesNotMatch(String, Regex, String) |
Tests whether the specified string does not match a regular expression and throws an exception if the string matches the expression. |
| DoesNotMatch(String, Regex, String, Object[]) |
Tests whether the specified string does not match a regular expression and throws an exception if the string matches the expression. |
DoesNotMatch(String, Regex)
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
Tests whether the specified string does not match a regular expression and throws an exception if the string matches the expression.
public static void DoesNotMatch(string value, System.Text.RegularExpressions.Regex pattern);
public static void DoesNotMatch(string? value, System.Text.RegularExpressions.Regex? pattern);
static member DoesNotMatch : string * System.Text.RegularExpressions.Regex -> unit
Public Shared Sub DoesNotMatch (value As String, pattern As Regex)
Parameters
- value
- String
The string that is expected not to match pattern.
- pattern
- Regex
The regular expression that value is
expected to not match.
Exceptions
value is null, or pattern is null,
or value matches pattern.
Applies to
DoesNotMatch(String, Regex, String)
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
Tests whether the specified string does not match a regular expression and throws an exception if the string matches the expression.
public static void DoesNotMatch(string value, System.Text.RegularExpressions.Regex pattern, string message);
public static void DoesNotMatch(string? value, System.Text.RegularExpressions.Regex? pattern, string? message);
static member DoesNotMatch : string * System.Text.RegularExpressions.Regex * string -> unit
Public Shared Sub DoesNotMatch (value As String, pattern As Regex, message As String)
Parameters
- value
- String
The string that is expected not to match pattern.
- pattern
- Regex
The regular expression that value is
expected to not match.
- message
- String
The message to include in the exception when value
matches pattern. The message is shown in test
results.
Exceptions
value is null, or pattern is null,
or value matches pattern.
Applies to
DoesNotMatch(String, Regex, String, Object[])
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
- Source:
- StringAssert.cs
Tests whether the specified string does not match a regular expression and throws an exception if the string matches the expression.
public static void DoesNotMatch(string value, System.Text.RegularExpressions.Regex pattern, string message, params object[] parameters);
public static void DoesNotMatch(string? value, System.Text.RegularExpressions.Regex? pattern, string? message, params object?[]? parameters);
static member DoesNotMatch : string * System.Text.RegularExpressions.Regex * string * obj[] -> unit
Public Shared Sub DoesNotMatch (value As String, pattern As Regex, message As String, ParamArray parameters As Object())
Parameters
- value
- String
The string that is expected not to match pattern.
- pattern
- Regex
The regular expression that value is
expected to not match.
- message
- String
The message to include in the exception when value
matches pattern. The message is shown in test
results.
- parameters
- Object[]
An array of parameters to use when formatting message.
Exceptions
value is null, or pattern is null,
or value matches pattern.