Return value from Assert.That overload with delegate #3421
Open
Description
It would be very convenient to have Assert.That
overload accepting ActualValueDelegate<TActual>
to return TActual value, with which assert passed.
Scenario, which happens for me quite often. I need to wait for some value (e.g. from rest service), and than assert it.
Currently I do something like that:
ActualType actual = null;
Assert.That(() => actual = getActual(), Is.Not.Null.After(5000, 100));
Assert.That(actual...);
Would be much nicer to have like that:
var actual = Assert.That(getActual, Is.Not.Null.After(...));
...
Metadata
Assignees
Labels
No labels