public void GetDestinationType_WithoutServiceConstructor() { var mapper = new MapperConfiguration <ClassSource, ClassDest>("sourceTest"); var actual = mapper.GetDestinationType(); Assert.AreEqual(actual, typeof(ClassDest)); }
public void GetDestinationType_WithoutServiceConstructor() { MapperConfiguration <ClassSource, ClassDest> mapper = new MapperConfiguration <ClassSource, ClassDest>("sourceTest"); Type actual = mapper.GetDestinationType(); Assert.IsType <ClassDest>(actual); }
public void GetDestinationType_WithoutServiceConstructor() { Type actual = null; var mapper = new MapperConfiguration<ClassSource, ClassDest>("sourceTest"); actual = mapper.GetDestinationType(); Assert.AreEqual(actual, typeof(ClassDest)); }
public void GetDestinationType_WithServiceConstructor() { ExpressionMapper.ConstructServicesUsing((x) => new ClassDest2()); MapperConfiguration <ClassSource2, IClassDest2> mapper = ExpressionMapper.CreateMap <ClassSource2, IClassDest2>().ConstructUsingServiceLocator(); ExpressionMapper.Initialize(); Type actual = mapper.GetDestinationType(); Assert.IsType <ClassDest2>(actual); ExpressionMapper.Reset(); }