public void ProjectingEnumToString() { var customers = new[] { new Customer() { FirstName = "Bill", LastName = "White", CustomerType = CustomerType.Vip } }.AsQueryable(); var projected = Mapper.Map<CustomerDto[]>(customers); projected.ShouldNotBeNull(); Assert.Equal(customers.Single().CustomerType.ToString().ToUpper(), projected.Single().CustomerType); }
public void ProjectingEnumToString() { var customers = new[] { new Customer() { FirstName = "Bill", LastName = "White", CustomerType = CustomerType.Vip } }.AsQueryable(); var projected = customers.ProjectTo<CustomerDto>(_mapper.ConfigurationProvider); projected.ShouldNotBeNull(); Assert.Equal(customers.Single().CustomerType.ToString().ToUpper(), projected.Single().CustomerType); }