Null and Empty
ShouldBeNull
var target = "Homer";
target.ShouldBeNull();Exception
target
should be null but was
"Homer"ShouldBeNullOrEmpty
var target = "Homer";
target.ShouldBeNullOrEmpty();Exception
target ("Homer")
should be null or emptyShouldBeEmpty
var target = "Homer";
target.ShouldBeEmpty();Exception
target
should be empty but was
"Homer"ShouldNotBeNull
string? target = null;
target.ShouldNotBeNull();Exception
target
should not be null but wasShouldNotBeNullOrEmpty
var target = "";
target.ShouldNotBeNullOrEmpty();Exception
target ("")
should not be null or emptyShouldNotBeEmpty
var target = "";
target.ShouldNotBeNullOrEmpty();Exception
target
should not be empty but wasLast updated