Current implementation supports action lambdas like increment/decrement and method calls.
Example:
class Foo
{
public void Bar() { throw new Exception(); }
public int Baz { get { throw new Exception(); } }
}
Verify.Exception<Exception>(() => new Foo().Bar());
It would also be great to have it support func lambdas like property access.
Example:
Support for expressions with return values will be in 0.0.2.12, also introducing a new syntax: Verify.Throws.When(() => ...) this to get a uniform feel for both actions and functions.
Current implementation supports action lambdas like increment/decrement and method calls. Example:
It would also be great to have it support func lambdas like property access. Example: