Shouldly
Search…
Shouldly
Overview
Contributing
Documentation
Getting Started
Configuration
Equality
String
Enumerable
ShouldBe
All
Empty
OneOf
Contain
Unique
SubsetOf
Dictionary
Exceptions
SatisfyAllConditions
CompleteIn
DynamicShould
Upgrade 3 to 4
Powered By
GitBook
Empty
ShouldBeEmpty
1
var
homer
=
new
Person
{
Name
=
"Homer"
};
2
var
powerPlantOnTheWeekend
=
new
List
<
Person
>
{
homer
};
3
powerPlantOnTheWeekend
.
ShouldBeEmpty
();
Copied!
snippet source
|
anchor
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!
snippet source
|
anchor
Exception
1
moesTavernOnTheWeekend
2
should not be empty but was
Copied!
Previous
All
Next
OneOf
Last modified
1yr ago
Copy link
Contents
ShouldBeEmpty
ShouldNotBeEmpty