Skip to content

xUnit 2 discovery fails if xunit.assert isn't loaded #373

@randomizer101

Description

@randomizer101

xunit.assert isn't loaded until one of the Assert.* methods is called. If this doesn't happen before a test fails, an AssertionFailedException is thrown instead of an XunitException. If the framework is specified in the application config file then FluentAssertions throws an exception because it can't find the framework.

I've worked around this by explicitly loading the assembly in my top level test classes' static constructors, but I'd prefer not to have to remember this for every class. Is it possible to have FluentAssertions attempt to load the assembly itself before determining if the framework is available?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions