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

            entity.SetProperties(1, 1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), "A");

            List <BOProductInventory> response = mapper.MapEFToBO(new List <ProductInventory>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }
        public virtual ProductInventory MapBOToEF(
            BOProductInventory bo)
        {
            ProductInventory efProductInventory = new ProductInventory();

            efProductInventory.SetProperties(
                bo.Bin,
                bo.LocationID,
                bo.ModifiedDate,
                bo.ProductID,
                bo.Quantity,
                bo.Rowguid,
                bo.Shelf);
            return(efProductInventory);
        }
Ejemplo n.º 3
0
        public void MapEFToBO()
        {
            var mapper = new DALProductInventoryMapper();
            ProductInventory entity = new ProductInventory();

            entity.SetProperties(1, 1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), "A");

            BOProductInventory response = mapper.MapEFToBO(entity);

            response.Bin.Should().Be(1);
            response.LocationID.Should().Be(1);
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.ProductID.Should().Be(1);
            response.Quantity.Should().Be(1);
            response.Rowguid.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
            response.Shelf.Should().Be("A");
        }