0

I want to use ShouldBeEquivalentTo() of fluent Assertion, by excluding few properties and making it an case insensitive comparison. For ex. I am comparing below 2 objects admin and lookUp by excluding LastModifiedDate and the County comparison should be case insensitive. Currently i am excluding it for the condition to work out but actually it should be a case insensitive comparison for County.

admin.ShouldBeEquivalentTo(
          lookUp,
          l => l.Excluding(a => a.GroupId)
     .Excluding(a => a.LastModifiedDate)
     .Excluding(a => a.County));

Please Suggest!

Roman
  • 11,966
  • 10
  • 38
  • 47
Haseena Parkar
  • 939
  • 2
  • 12
  • 28

1 Answers1

0

The FluentAssertion string comparison is already case-insensitive.

yinnonsanders
  • 1,831
  • 11
  • 28