I have a pair of DTOs which were defined using different naming conventions, one using PascalCase
while the other uses camelCase
.
When I run a verification of result.Should().BeEquivalentTo(camelCase, PascalCase)
, I get the following failure:
Expectation has property result.camelCaseProperty that the other object does not have.
I’ve been circumventing this problem by configuring checks such as:
result.Should().BeEquivalentTo(camelCase, options => options
.WithMapping("someVariable", "SomeVariable"));
However, this ends up being too verbose.
Does FluentValidation offer any way to configure mapping changes reflecting naming conventions?