There is almost always an 'not' version
int myVar = 0;
ThrowOn(() => myVar)
.If( value => value == 0);
int? myVar = null;
ThrowOn(() => myVar)
.IfNull();
int myVar = 0;
ThrowOn(() => myVar)
.IfDefault();
Works currently for
- strings
- IEnumerable
- IDictionary
- Guid
string myVar = "";
ThrowOn(() => myVar)
.IfEmpty();
string myVar = "";
ThrowOn(() => myVar)
.IfNullOrWhiteSpace();
int myVar = 0;
ThrowOn(() => myVar)
.IfEqualsTo(0);
int myVar = 0;
ThrowOn(() => myVar)
.IfGreaterThan(-1);
int myVar = 0;
ThrowOn(() => myVar)
.IfGreaterOrEqualsThan(0);
int myVar = 0;
ThrowOn(() => myVar)
.IfLowerThan(1);
int myVar = 0;
ThrowOn(() => myVar)
.IfLowerOrEqualsThan(0);