Shouldly
Search…
All
1
var mrBurns = new Person { Name = "Mr.Burns", Salary = 3000000 };
2
var kentBrockman = new Person { Name = "Homer", Salary = 3000000 };
3
var homer = new Person { Name = "Homer", Salary = 30000 };
4
var millionaires = new List<Person> { mrBurns, kentBrockman, homer };
5
millionaires.ShouldAllBe(m => m.Salary > 1000000);
Copied!
Exception
1
millionaires
2
should satisfy the condition
3
(m.Salary > 1000000)
4
but
5
[Homer]
6
do not
Copied!
Last modified 1yr ago
Copy link