Testing if a converter is applied for a map

11 views
Skip to first unread message

akhan...@gmail.com

unread,
Aug 29, 2017, 3:16:30 AM8/29/17
to AutoMapper-users
I'm trying to test whether a converter has been applied for a map or not.

I find the required map using 
var typemap = mapper.ConfigurationProvider.FindTypeMapFor<TSourceModel, TDestinationModel>();

and then assert typemap.TypeConverterType

This method is working fine when using ConvertUsing<TTypeConverter>() in the maps.
But TypeConverterType is null when using ConvertUsing(ITypeConverter<TSource, TDestination> converter).
I could not find any converter related information in the TypeMap for this case.

Would appreciate any suggestions.

Thanks.
Reply all
Reply to author
Forward
0 new messages