public void MapEFToBOList() { var mapper = new DALProductCostHistoryMapper(); ProductCostHistory entity = new ProductCostHistory(); entity.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1m, DateTime.Parse("1/1/1987 12:00:00 AM")); List <BOProductCostHistory> response = mapper.MapEFToBO(new List <ProductCostHistory>() { entity }); response.Count.Should().Be(1); }
public void MapEFToBO() { var mapper = new DALProductCostHistoryMapper(); ProductCostHistory entity = new ProductCostHistory(); entity.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1m, DateTime.Parse("1/1/1987 12:00:00 AM")); BOProductCostHistory response = mapper.MapEFToBO(entity); response.EndDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.ProductID.Should().Be(1); response.StandardCost.Should().Be(1m); response.StartDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); }
public void MapBOToEF() { var mapper = new DALProductCostHistoryMapper(); var bo = new BOProductCostHistory(); bo.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), DateTime.Parse("1/1/1987 12:00:00 AM"), 1m, DateTime.Parse("1/1/1987 12:00:00 AM")); ProductCostHistory response = mapper.MapBOToEF(bo); response.EndDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.ProductID.Should().Be(1); response.StandardCost.Should().Be(1m); response.StartDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); }