StartWith

ShouldStartWith

var target = "Homer";
target.ShouldStartWith("Bart");

snippet source | anchor

Exception

target
    should start with
"Bart"
    but was
"Homer"

ShouldNotStartWith

var target = "Homer Simpson";
target.ShouldNotStartWith("Homer");

snippet source | anchor

Exception

target
    should not start with
"Homer"
    but was
"Homer Simpson"

Last updated