Пример #1
0
        public void MapModelToBO()
        {
            var mapper = new BOLPostTypesMapper();
            ApiPostTypesRequestModel model = new ApiPostTypesRequestModel();

            model.SetProperties("A");
            BOPostTypes response = mapper.MapModelToBO(1, model);

            response.Type.Should().Be("A");
        }
Пример #2
0
        public void MapBOToModel()
        {
            var         mapper = new BOLPostTypesMapper();
            BOPostTypes bo     = new BOPostTypes();

            bo.SetProperties(1, "A");
            ApiPostTypesResponseModel response = mapper.MapBOToModel(bo);

            response.Id.Should().Be(1);
            response.Type.Should().Be("A");
        }
Пример #3
0
        public void MapEFToBO()
        {
            var       mapper = new DALPostTypesMapper();
            PostTypes entity = new PostTypes();

            entity.SetProperties(1, "A");

            BOPostTypes response = mapper.MapEFToBO(entity);

            response.Id.Should().Be(1);
            response.Type.Should().Be("A");
        }
Пример #4
0
        public void MapBOToEF()
        {
            var mapper = new DALPostTypesMapper();
            var bo     = new BOPostTypes();

            bo.SetProperties(1, "A");

            PostTypes response = mapper.MapBOToEF(bo);

            response.Id.Should().Be(1);
            response.Type.Should().Be("A");
        }
Пример #5
0
        public void MapBOToModelList()
        {
            var         mapper = new BOLPostTypesMapper();
            BOPostTypes bo     = new BOPostTypes();

            bo.SetProperties(1, "A");
            List <ApiPostTypesResponseModel> response = mapper.MapBOToModel(new List <BOPostTypes>()
            {
                { bo }
            });

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