public void MapBOToModelList() { var mapper = new BOLPurchaseOrderHeaderMapper(); BOPurchaseOrderHeader bo = new BOPurchaseOrderHeader(); bo.SetProperties(1, 1, 1m, DateTime.Parse("1/1/1987 12:00:00 AM"), DateTime.Parse("1/1/1987 12:00:00 AM"), 1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, 1m, 1m, 1m, 1); List <ApiPurchaseOrderHeaderResponseModel> response = mapper.MapBOToModel(new List <BOPurchaseOrderHeader>() { { bo } }); response.Count.Should().Be(1); }
public void MapBOToModel() { var mapper = new BOLPurchaseOrderHeaderMapper(); BOPurchaseOrderHeader bo = new BOPurchaseOrderHeader(); bo.SetProperties(1, 1, 1m, DateTime.Parse("1/1/1987 12:00:00 AM"), DateTime.Parse("1/1/1987 12:00:00 AM"), 1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, 1m, 1m, 1m, 1); ApiPurchaseOrderHeaderResponseModel response = mapper.MapBOToModel(bo); response.EmployeeID.Should().Be(1); response.Freight.Should().Be(1m); response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.OrderDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.PurchaseOrderID.Should().Be(1); response.RevisionNumber.Should().Be(1); response.ShipDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.ShipMethodID.Should().Be(1); response.Status.Should().Be(1); response.SubTotal.Should().Be(1m); response.TaxAmt.Should().Be(1m); response.TotalDue.Should().Be(1m); response.VendorID.Should().Be(1); }