Skip to content

Improve PropertiesComparer diagnostics #4710

@chucker

Description

@chucker

Can the PropertiesComparer return which property was unequal? It seems it currently fails without that information:

                        if (result == EqualMethodResult.ComparedNotEqual)
                            return result;

When a type has multiple properties, this only outputs the name of the type (or whatever ToString() happens to return), e.g.

Assert.That(result[0], Is.EqualTo(testData.ExpectedResult[0]).UsingPropertiesComparer())
  Expected: <MyTypeName>
  But was:  <MyTypeName>

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions