public void MapEntityToModelList() { var mapper = new DALEmailMapper(); Email item = new Email(); item.SetProperties(1, 1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A"); List <ApiEmailServerResponseModel> response = mapper.MapEntityToModel(new List <Email>() { { item } }); response.Count.Should().Be(1); }
public void MapEntityToModel() { var mapper = new DALEmailMapper(); Email item = new Email(); item.SetProperties(1, 1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A"); ApiEmailServerResponseModel response = mapper.MapEntityToModel(item); response.ArtistId.Should().Be(1); response.DateCreated.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.EmailValue.Should().Be("A"); response.Id.Should().Be(1); }