Ejemplo n.º 1
0
        public void MapEFToBOList()
        {
            var           mapper = new DALProductVendorMapper();
            ProductVendor entity = new ProductVendor();

            entity.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, 1, 1m, "A");

            List <BOProductVendor> response = mapper.MapEFToBO(new List <ProductVendor>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }
Ejemplo n.º 2
0
        public void MapEFToBO()
        {
            var           mapper = new DALProductVendorMapper();
            ProductVendor entity = new ProductVendor();

            entity.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, 1, 1m, "A");

            BOProductVendor response = mapper.MapEFToBO(entity);

            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.ProductID.Should().Be(1);
            response.StandardPrice.Should().Be(1m);
            response.UnitMeasureCode.Should().Be("A");
        }