Comment on page
Null and Empty
var target = "Homer";
target.ShouldBeNull();
Exception
target
should be null but was
"Homer"
var target = "Homer";
target.ShouldBeNullOrEmpty();
Exception
target ("Homer")
should be null or empty
var target = "Homer";
target.ShouldBeEmpty();
Exception
target
should be empty but was
"Homer"
string? target = null;
target.ShouldNotBeNull();
Exception
target
should not be null but was
var target = "";
target.ShouldNotBeNullOrEmpty();
Exception
target ("")
should not be null or empty
var target = "";
target.ShouldNotBeNullOrEmpty();
Exception
target
should not be empty but was
Last modified 7mo ago