예제 #1
0
        public void MapModelToBO()
        {
            var mapper = new BOLCompositePrimaryKeyMapper();
            ApiCompositePrimaryKeyRequestModel model = new ApiCompositePrimaryKeyRequestModel();

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

            response.Id2.Should().Be(1);
        }
예제 #2
0
        public void MapBOToModel()
        {
            var mapper = new BOLCompositePrimaryKeyMapper();
            BOCompositePrimaryKey bo = new BOCompositePrimaryKey();

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

            response.Id.Should().Be(1);
            response.Id2.Should().Be(1);
        }
예제 #3
0
        public void MapEFToBO()
        {
            var mapper = new DALCompositePrimaryKeyMapper();
            CompositePrimaryKey entity = new CompositePrimaryKey();

            entity.SetProperties(1, 1);

            BOCompositePrimaryKey response = mapper.MapEFToBO(entity);

            response.Id.Should().Be(1);
            response.Id2.Should().Be(1);
        }
예제 #4
0
        public void MapBOToEF()
        {
            var mapper = new DALCompositePrimaryKeyMapper();
            var bo     = new BOCompositePrimaryKey();

            bo.SetProperties(1, 1);

            CompositePrimaryKey response = mapper.MapBOToEF(bo);

            response.Id.Should().Be(1);
            response.Id2.Should().Be(1);
        }
예제 #5
0
        public void MapBOToModelList()
        {
            var mapper = new BOLCompositePrimaryKeyMapper();
            BOCompositePrimaryKey bo = new BOCompositePrimaryKey();

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

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