I got this test:
[Fact]
public void EverythingIsMappedJustFine(){
new AutoMapperTask().Execute();
Mapper.AssertConfigurationIsValid();
}
It throws a bit strange exception:
Test 'Unit.Web.Bootstrap.AutoMapperFacts.EverythingIsMappedJustFine' failed:
System.InvalidOperationException : No coercion operator is defined
between types 'System.Void' and 'System.Object'.
at System.Linq.Expressions.Expression.GetUserDefinedCoercionOrThrow(ExpressionType coercionType, Expression expression, Type convertToType)
...
at AutoMapper.DelegateFactory.CreateGet(MethodInfo method)
Unfortunately - I couldn't reproduce this on smaller scale and can't figure out what exactly is going on.
What is coercion operator?
This might be useful. But I'm failing to extract and dumb down necessary information bits.