Skip to content

Support for xUnit.net v3 #2709

@0xced

Description

@0xced

Background and motivation

I just read What’s New in xUnit.net v3 and figured this is relevant to FluentAssertions.

A new FailureCause enum has been added, and is returned inside ITestFailed messages. It gives a best guess as to the cause of the test failure: assertion failure, exception thrown, or test timed out.

This best guess is based on two contracts added to v3 which can be implemented by third party assertion libraries. Throwing an exception which implements an interface named IAssertionException (in any namespace) will be reported as an assertion failure; similarly, throwing an exception which implements an interface named ITestTimeoutException (in any namespace) will be reported as a timed-out test.

This looks like an easy task to implement for FluentAssertions.

Alternative Concerns

No response

Are you willing help with a pull-request?

Yes, please assign this issue to me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-suggestionEarly API idea and discussion, it is NOT ready for implementationfeature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions