I'm trying to use FluentAssertions not only as testing assertions framework but also to check runtime contracts (like advanced Debug.Assert, and I have read this question). The desired behaviour is:
Is there a way to customize failure handling behaviour? There is IAssertionStrategy
interface which is exactly about failure handling. However, it's implementations are hard-coded inside the AssertionScope.
Did I miss something in the sources?
You can set FluentAssertions.Common.Services.ThrowException
to override the behavior. Note though it was never designed for that.