Shouldly
Search…
EndWith

ShouldEndWith

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

ShouldNotEndWith

1
var target = "Homer Simpson";
2
target.ShouldNotEndWith("Simpson");
Copied!
Exception
1
target
2
should not end with
3
"Simpson"
4
but was
5
"Homer Simpson"
Copied!