Null and Empty

ShouldBeNull

var target = "Homer";
target.ShouldBeNull();

snippet source | anchor

Exception

target
    should be null but was
"Homer"

ShouldBeNullOrEmpty

var target = "Homer";
target.ShouldBeNullOrEmpty();

snippet source | anchor

Exception

target ("Homer")
    should be null or empty

ShouldBeEmpty

snippet source | anchor

Exception

ShouldNotBeNull

snippet source | anchor

Exception

ShouldNotBeNullOrEmpty

snippet source | anchor

Exception

ShouldNotBeEmpty

snippet source | anchor

Exception

Last updated