public void AddConventions([Frozen] Mock <IMapperConfiguration> configurationMock, Mapper.SetupMapping map) { map.WithConvention( (s, d) => from destination in d join source in s on destination.Name.ToLower() equals source.Name.ToLower() where source.CanRead && destination.CanWrite select new { source, destination }); configurationMock.Verify(x => x.AddConvention(It.IsAny <Func <PropertyInfo[], PropertyInfo[], IEnumerable <object> > >()), Times.Once); }
public void AddGenericConvention([Frozen] Mock <IMapperConfiguration> configurationMock, Mapper.SetupMapping map) { map.WithConvention <SameNameIgnoreCaseConvention>(); configurationMock.Verify(x => x.AddConvention(It.IsAny <Func <PropertyInfo[], PropertyInfo[], IEnumerable <object> > >()), Times.Once); }