New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4.2.0 .Include<DerivedSourceType, DerivedTargetType> throws exception with base type names #1077
Comments
Anything that you "Include" has to include its own CreateMap call. Them's the rules. |
:) |
@lbargaoanu @jbogard That's sort of what I mean, but my point is actually that that test asserts that the message contains the name of the base type, not the derived type. This: ex=>ex.Message.ShouldStartWith("Missing map from Object to BaseType.")); Should be, in my humble opinion: ex=>ex.Message.ShouldStartWith("Missing map from Object to ChildType.")); |
Yes, the original test was wrong. |
Yay I helped! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Creating a map and including a map which doesn't exist throws an exception that doesn't really help find the missing map.
Consider the following:
`
`
The test throws an exception with message :
It is right to throw because I have not defined a map from SourceDerived to TargetDerived.
In my opinion it would be much more helpful if the message read:
@jbogard If you agree, I would happily provide a PR
The text was updated successfully, but these errors were encountered: