Skip to content

Add support for FluentAssertions 8+ #36

Description

@drew-cooper

Is your feature request related to a problem? Please describe.
After upgrading to FluentAssertions v8.* a simple assertion like:

container.Should().Resolve<ISessionFactory>();

results in the following exception:

Message: 
  System.MissingMethodException : Method not found: 'Void FluentAssertions.Primitives.ReferenceTypeAssertions`2..ctor(!0)'.

  Stack Trace: 
    ContainerAssertions.ctor(IComponentContext container)
    ContainerAssertions.ctor(IComponentContext container)
    AutofacAssertionExtensions.Should(IComponentContext container)
    NHibernateDatabaseModuleTests.Load_EnablesResolutionOfISessionFactory() line 64
    MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
    RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

I understand that this is because of the internal changes in FluentAssertions, adding the AssertionChain mechanism.

Describe the solution you'd like
The assertions in this package (or another) should work with FluentAssertions v8+ without modification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions