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
Unique
1
var
lisa
=
new
Person
{
Name
=
"Lisa"
};
2
var
bart
=
new
Person
{
Name
=
"Bart"
};
3
var
maggie
=
new
Person
{
Name
=
"Maggie"
};
4
var
simpsonsKids
=
new
List
<
Person
>
{
bart
,
lisa
,
maggie
,
maggie
};
5
simpsonsKids
.
ShouldBeUnique
();
Copied!
snippet source
|
anchor
Exception
1
simpsonsKids
2
should be unique but
3
[Maggie]
4
was duplicated
Copied!
Previous
Contain
Next
SubsetOf
Last modified
1yr ago
Copy link