Shouldly
Search…
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!
Exception
1
simpsonsKids
2
should be unique but
3
[Maggie]
4
was duplicated
Copied!
Last modified 9mo ago
Copy link