Can you add messages to x.Should().Throw<MyException>()
from fluent Assertion if the Test fails?
In my scenario, I exactly know why this test would fail, and I want to display a message if it does, but I cant find a way.
The closest thing I found was the because
argument in the Throw()
, but the text does not makes sense as it would be "Expected a < MyException > to be thrown because MY_REASON_THE_TEST_FAILED, but no exception was thrown."
If possible, I would like the failing message to be something like "The test failed, probably because MY_REASON_THE_TEST_FAILED"