示例#1
0
        public void MapModelToBO()
        {
            var mapper = new BOLClaspMapper();
            ApiClaspRequestModel model = new ApiClaspRequestModel();

            model.SetProperties(1, 1);
            BOClasp response = mapper.MapModelToBO(1, model);

            response.NextChainId.Should().Be(1);
            response.PreviousChainId.Should().Be(1);
        }
示例#2
0
        public void MapBOToModel()
        {
            var     mapper = new BOLClaspMapper();
            BOClasp bo     = new BOClasp();

            bo.SetProperties(1, 1, 1);
            ApiClaspResponseModel response = mapper.MapBOToModel(bo);

            response.Id.Should().Be(1);
            response.NextChainId.Should().Be(1);
            response.PreviousChainId.Should().Be(1);
        }
示例#3
0
        public void MapBOToModelList()
        {
            var     mapper = new BOLClaspMapper();
            BOClasp bo     = new BOClasp();

            bo.SetProperties(1, 1, 1);
            List <ApiClaspResponseModel> response = mapper.MapBOToModel(new List <BOClasp>()
            {
                { bo }
            });

            response.Count.Should().Be(1);
        }
示例#4
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);
        }
示例#5
0
        public void MapBOToEF()
        {
            var mapper = new DALClaspMapper();
            var bo     = new BOClasp();

            bo.SetProperties(1, 1, 1);

            Clasp response = mapper.MapBOToEF(bo);

            response.Id.Should().Be(1);
            response.NextChainId.Should().Be(1);
            response.PreviousChainId.Should().Be(1);
        }