StringAssertions.NotContain Method
Definition
Asserts that the string does not contain the specified substring.
c#
public new AssertionsChain<StringAssertions, string> NotContain(string expected, StringComparison comparison = StringComparison.System.StringComparison);Parameters
| Name | Type | Description |
|---|---|---|
expected | String | The substring that should not be present. |
comparison | StringComparison | The StringComparison to use. Defaults to Ordinal. |
Returns
AssertionsChain<StringAssertions, String>
An AssertionsChain<TAssertions, T> for chaining further assertions.