public void Should_have_contextual_mapping_information() { var source = new Source { Value = "adsf" }; AutoMapperMappingException thrown = null; try { Mapper.Map <Source, Dest>(source); } catch (AutoMapperMappingException ex) { thrown = ex; } thrown.ShouldNotBeNull(); }
public void Should_have_contextual_mapping_information() { var source = new Source { Value = "adsf" }; AutoMapperMappingException thrown = null; try { Mapper.Map <Source, Dest>(source); } catch (AutoMapperMappingException ex) { thrown = ex; } thrown.ShouldNotBeNull(); thrown.InnerException.ShouldNotBeNull(); thrown.InnerException.ShouldBeType <AutoMapperMappingException>(); ((AutoMapperMappingException)thrown.InnerException).Context.PropertyMap.ShouldNotBeNull(); }