Exemplo n.º 1
0
        public virtual Clasp MapBOToEF(
            BOClasp bo)
        {
            Clasp efClasp = new Clasp();

            efClasp.SetProperties(
                bo.Id,
                bo.NextChainId,
                bo.PreviousChainId);
            return(efClasp);
        }
Exemplo n.º 2
0
        public void MapEntityToModel()
        {
            var   mapper = new DALClaspMapper();
            Clasp item   = new Clasp();

            item.SetProperties(1, 1, 1);
            ApiClaspServerResponseModel response = mapper.MapEntityToModel(item);

            response.Id.Should().Be(1);
            response.NextChainId.Should().Be(1);
            response.PreviousChainId.Should().Be(1);
        }
Exemplo n.º 3
0
        public void MapEntityToModelList()
        {
            var   mapper = new DALClaspMapper();
            Clasp item   = new Clasp();

            item.SetProperties(1, 1, 1);
            List <ApiClaspServerResponseModel> response = mapper.MapEntityToModel(new List <Clasp>()
            {
                { item }
            });

            response.Count.Should().Be(1);
        }
Exemplo n.º 4
0
        public virtual Clasp MapModelToEntity(
            int id,
            ApiClaspServerRequestModel model
            )
        {
            Clasp item = new Clasp();

            item.SetProperties(
                id,
                model.NextChainId,
                model.PreviousChainId);
            return(item);
        }
Exemplo n.º 5
0
        public void MapEFToBO()
        {
            var   mapper = new DALClaspMapper();
            Clasp entity = new Clasp();

            entity.SetProperties(1, 1, 1);

            BOClasp response = mapper.MapEFToBO(entity);

            response.Id.Should().Be(1);
            response.NextChainId.Should().Be(1);
            response.PreviousChainId.Should().Be(1);
        }
Exemplo n.º 6
0
        public void MapEFToBOList()
        {
            var   mapper = new DALClaspMapper();
            Clasp entity = new Clasp();

            entity.SetProperties(1, 1, 1);

            List <BOClasp> response = mapper.MapEFToBO(new List <Clasp>()
            {
                entity
            });

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