Skip to content

StringAssertions.StartWith Method

Definition

Asserts that the string starts with the specified value.

public StringAssertionsChain StartWith(string expected, StringComparison comparison = StringComparison.System.StringComparison);

Parameters

Name Type Description
expected String The expected start of the string.
comparison StringComparison The StringComparison to use. Defaults to Ordinal.

Returns

StringAssertionsChain

A StringAssertionsChain for chaining further assertions.