Match

ShouldMatch

var target = "Homer Simpson";
target.ShouldMatch("Bart .*");

snippet source | anchor

Exception

target
should match
"Bart .*"
but was
"Homer Simpson"

ShouldNotMatch

var target = "Homer Simpson";
target.ShouldNotMatch("Homer .*");

snippet source | anchor

Exception

target should not match "Homer .*" but did