Shouldly
Search…
Empty

ShouldBeEmpty

1
var homer = new Person { Name = "Homer" };
2
var powerPlantOnTheWeekend = new List<Person> { homer };
3
powerPlantOnTheWeekend.ShouldBeEmpty();
Copied!
Exception
1
powerPlantOnTheWeekend
2
should be empty but had
3
1
4
item and was
5
[Homer]
Copied!

ShouldNotBeEmpty

1
var moesTavernOnTheWeekend = new List<Person>();
2
moesTavernOnTheWeekend.ShouldNotBeEmpty();
Copied!
Exception
1
moesTavernOnTheWeekend
2
should not be empty but was
Copied!
Last modified 1yr ago