public void ConfigureBasic() { Kick.Start(config => config .IncludeAssemblyFor<UserProfile>() .UseAutoMapper() ); var employee = new Employee { FirstName = "Test", LastName = "User", EmailAddress = "*****@*****.**", SysVersion = BitConverter.GetBytes(8) }; var user = Mapper.Map<User>(employee); user.Should().NotBeNull(); user.EmailAddress.Should().Be(employee.EmailAddress); user.SysVersion.Should().NotBeNull(); }
public void ConfigureFull() { Kick.Start(config => config .IncludeAssemblyFor<UserProfile>() .UseAutoMapper(c => c .Validate() .Initialize(map => map.AddGlobalIgnore("SysVersion")) ) ); var employee = new Employee { FirstName = "Test", LastName = "User", EmailAddress = "*****@*****.**", SysVersion = BitConverter.GetBytes(8) }; var user = Mapper.Map<User>(employee); user.Should().NotBeNull(); user.EmailAddress.Should().Be(employee.EmailAddress); }