public virtual ApiProductListPriceHistoryResponseModel MapBOToModel( BOProductListPriceHistory boProductListPriceHistory) { var model = new ApiProductListPriceHistoryResponseModel(); model.SetProperties(boProductListPriceHistory.ProductID, boProductListPriceHistory.EndDate, boProductListPriceHistory.ListPrice, boProductListPriceHistory.ModifiedDate, boProductListPriceHistory.StartDate); return(model); }
public void MapResponseToRequest() { var mapper = new ApiProductListPriceHistoryModelMapper(); var model = new ApiProductListPriceHistoryResponseModel(); model.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1m, DateTime.Parse("1/1/1987 12:00:00 AM"), DateTime.Parse("1/1/1987 12:00:00 AM")); ApiProductListPriceHistoryRequestModel response = mapper.MapResponseToRequest(model); response.EndDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.ListPrice.Should().Be(1m); response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.StartDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); }