Skip to content

Test using ShouldBe with dynamic proxy is failing after update to 2.1.0 #120

@vorou

Description

@vorou

I'm using Likeness, which creates a dynamic proxy of my object with properly overridden Equals method (it compares all the public props on the object). This assertion is failing after I updated Shouldly to 2.1.0:

actual.ShouldBe(expected.AsSource().OfLikeness<Tender>().CreateProxy());

But it works OK if swap the arguments:

expected.AsSource().OfLikeness<Tender>().CreateProxy().ShouldBe(actual);

The original order is more natural, I guess. It would be cool if there is a way to make it work again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions