Shouldly
Search…
StartWith

ShouldStartWith

1
var target = "Homer";
2
target.ShouldStartWith("Bart");
Copied!
Exception
1
target
2
should start with
3
"Bart"
4
but was
5
"Homer"
Copied!

ShouldNotStartWith

1
var target = "Homer Simpson";
2
target.ShouldNotStartWith("Homer");
Copied!
Exception
1
target
2
should not start with
3
"Homer"
4
but was
5
"Homer Simpson"
Copied!
Last modified 1yr ago