public void MapEntityToModelList() { var mapper = new DALEventMapper(); Event item = new Event(); item.SetProperties(1, "A", "A", 1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A", DateTime.Parse("1/1/1987 12:00:00 AM"), "A", "A", DateTime.Parse("1/1/1987 12:00:00 AM"), "A"); List <ApiEventServerResponseModel> response = mapper.MapEntityToModel(new List <Event>() { { item } }); response.Count.Should().Be(1); }
public void MapEntityToModel() { var mapper = new DALEventMapper(); Event item = new Event(); item.SetProperties(1, "A", "A", 1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A", DateTime.Parse("1/1/1987 12:00:00 AM"), "A", "A", DateTime.Parse("1/1/1987 12:00:00 AM"), "A"); ApiEventServerResponseModel response = mapper.MapEntityToModel(item); response.Address1.Should().Be("A"); response.Address2.Should().Be("A"); response.CityId.Should().Be(1); response.Date.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Description.Should().Be("A"); response.EndDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Facebook.Should().Be("A"); response.Id.Should().Be(1); response.Name.Should().Be("A"); response.StartDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Website.Should().Be("A"); }