Beispiel #1
0
        public void MapEFToBO()
        {
            var   mapper = new DALStateMapper();
            State entity = new State();

            entity.SetProperties(1, "A");

            BOState response = mapper.MapEFToBO(entity);

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
Beispiel #2
0
        public void MapBOToEF()
        {
            var mapper = new DALStateMapper();
            var bo     = new BOState();

            bo.SetProperties(1, "A");

            State response = mapper.MapBOToEF(bo);

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
Beispiel #3
0
        public void MapEFToBOList()
        {
            var   mapper = new DALStateMapper();
            State entity = new State();

            entity.SetProperties(1, "A");

            List <BOState> response = mapper.MapEFToBO(new List <State>()
            {
                entity
            });

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