Exemplo n.º 1
0
        public void MapEFToBO()
        {
            var         mapper = new DALScrapReasonMapper();
            ScrapReason entity = new ScrapReason();

            entity.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), "A", 1);

            BOScrapReason response = mapper.MapEFToBO(entity);

            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Name.Should().Be("A");
            response.ScrapReasonID.Should().Be(1);
        }
Exemplo n.º 2
0
        public void MapBOToEF()
        {
            var mapper = new DALScrapReasonMapper();
            var bo     = new BOScrapReason();

            bo.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A");

            ScrapReason response = mapper.MapBOToEF(bo);

            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Name.Should().Be("A");
            response.ScrapReasonID.Should().Be(1);
        }
Exemplo n.º 3
0
        public void MapEFToBOList()
        {
            var         mapper = new DALScrapReasonMapper();
            ScrapReason entity = new ScrapReason();

            entity.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), "A", 1);

            List <BOScrapReason> response = mapper.MapEFToBO(new List <ScrapReason>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }