Empty

ShouldBeEmpty

var homer = new Person { Name = "Homer" };
var powerPlantOnTheWeekend = new List<Person> { homer };
powerPlantOnTheWeekend.ShouldBeEmpty();

snippet source | anchor

Exception

powerPlantOnTheWeekend
    should be empty but had
1
    item and was
[Homer]

ShouldNotBeEmpty

var moesTavernOnTheWeekend = new List<Person>();
moesTavernOnTheWeekend.ShouldNotBeEmpty();

snippet source | anchor

Exception

moesTavernOnTheWeekend
    should not be empty but was

Last updated