Shouldly
Search…
Bool
ShouldBeTrue and ShouldBeFalse work on boolean values.

ShouldBeTrue

1
var myValue = false;
2
myValue.ShouldBeTrue();
Copied!
Exception
1
myValue
2
should be
3
True
4
but was
5
False
Copied!

ShouldBeFalse

1
var myValue = true;
2
myValue.ShouldBeFalse();
Copied!
Exception
1
myValue
2
should be
3
False
4
but was
5
True
Copied!
Last modified 1yr ago
Copy link