public void MapBOToModelList() { var mapper = new BOLProductVendorMapper(); BOProductVendor bo = new BOProductVendor(); bo.SetProperties(1, 1, 1, 1m, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1m, "A"); List <ApiProductVendorResponseModel> response = mapper.MapBOToModel(new List <BOProductVendor>() { { bo } }); response.Count.Should().Be(1); }
public void MapModelToBO() { var mapper = new BOLProductVendorMapper(); ApiProductVendorRequestModel model = new ApiProductVendorRequestModel(); model.SetProperties(1, 1, 1m, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1m, "A"); BOProductVendor response = mapper.MapModelToBO(1, model); response.AverageLeadTime.Should().Be(1); response.BusinessEntityID.Should().Be(1); response.LastReceiptCost.Should().Be(1m); response.LastReceiptDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.MaxOrderQty.Should().Be(1); response.MinOrderQty.Should().Be(1); response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.OnOrderQty.Should().Be(1); response.StandardPrice.Should().Be(1m); response.UnitMeasureCode.Should().Be("A"); }