Пример #1
0
        public void MapEFToBO()
        {
            var mapper = new DALSpecialOfferProductMapper();
            SpecialOfferProduct entity = new SpecialOfferProduct();

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

            BOSpecialOfferProduct response = mapper.MapEFToBO(entity);

            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.ProductID.Should().Be(1);
            response.Rowguid.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
            response.SpecialOfferID.Should().Be(1);
        }
Пример #2
0
        public void MapEFToBOList()
        {
            var mapper = new DALSpecialOfferProductMapper();
            SpecialOfferProduct entity = new SpecialOfferProduct();

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

            List <BOSpecialOfferProduct> response = mapper.MapEFToBO(new List <SpecialOfferProduct>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }
Пример #3
0
        public void MapBOToEF()
        {
            var mapper = new DALSpecialOfferProductMapper();
            var bo     = new BOSpecialOfferProduct();

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

            SpecialOfferProduct response = mapper.MapBOToEF(bo);

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