Skip to content

StringAssertions.EndWith Method ​

Definition ​

Asserts that the string ends with the specified value.

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

View source

Parameters ​

NameTypeDescription
expectedStringThe expected end of the string.
comparisonStringComparisonThe StringComparison to use. Defaults to Ordinal.

Returns ​

AssertionsChain<StringAssertions, String>

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