EndWith

ShouldEndWith

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

snippet source | anchor

Exception

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

ShouldNotEndWith

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

snippet source | anchor

Exception

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

Last updated