In a method like
void ReturnIfObjectIsNull()
{
var obj = new SomeObject();
if (obj == null)
return;
// Do other stuff..
}
How do I assert that the early return fired (without asserting that the stuff that would have happened afterword never occurred).
Asserting the object is null is not enough. I would need to assert that he function returned early when the object was null.
Thanks.