Beispiel #1
0
        public void MapEFToBOList()
        {
            var          mapper = new DALProductModelMapper();
            ProductModel entity = new ProductModel();

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

            List <BOProductModel> response = mapper.MapEFToBO(new List <ProductModel>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }
Beispiel #2
0
        public void MapEFToBO()
        {
            var          mapper = new DALProductModelMapper();
            ProductModel entity = new ProductModel();

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

            BOProductModel response = mapper.MapEFToBO(entity);

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