I have seen code that does: Assert.That(() => instance.Method(parameters), Is.True);
There is no need for the lambda.
The lambda is only needed if:
- Expecting an exception, like in:
Assert.That(() => instance.Method(parameters), Throws.InvalidOperationException);
- Using DelayConstraint, like in: `Assert.That(() => instance.Method(parameters), Is.True.After(1).Seconds;
I would like a new Analyzer with code fix that is raises issues and allows removing the lambda.
This rule is the opposite of NUnit2044 (Delegate Required)