예제 #1
0
        public void MapEFToBO()
        {
            var         mapper = new DALDestinationMapper();
            Destination entity = new Destination();

            entity.SetProperties(1, 1, "A", 1);

            BODestination response = mapper.MapEFToBO(entity);

            response.CountryId.Should().Be(1);
            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
            response.Order.Should().Be(1);
        }
예제 #2
0
        public void MapEFToBOList()
        {
            var         mapper = new DALDestinationMapper();
            Destination entity = new Destination();

            entity.SetProperties(1, 1, "A", 1);

            List <BODestination> response = mapper.MapEFToBO(new List <Destination>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }
예제 #3
0
        public void MapBOToEF()
        {
            var mapper = new DALDestinationMapper();
            var bo     = new BODestination();

            bo.SetProperties(1, 1, "A", 1);

            Destination response = mapper.MapBOToEF(bo);

            response.CountryId.Should().Be(1);
            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
            response.Order.Should().Be(1);
        }