Skip to content

StringAssertions.NotEndWith Method ​

Definition ​

Asserts that the string does not end with the specified value.

c#
public AssertionsChain<StringAssertions, string> NotEndWith(string expected, StringComparison comparison = StringComparison.System.StringComparison);

View source

Parameters ​

NameTypeDescription
expectedStringThe value the string should not end with.
comparisonStringComparisonThe StringComparison to use. Defaults to Ordinal.

Returns ​

AssertionsChain<StringAssertions, String>

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