Example #1
0
        public void MapModelToBO()
        {
            var mapper = new BOLPostTypeMapper();
            ApiPostTypeRequestModel model = new ApiPostTypeRequestModel();

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

            response.Type.Should().Be("A");
        }
Example #2
0
        public void MapBOToModel()
        {
            var        mapper = new BOLPostTypeMapper();
            BOPostType bo     = new BOPostType();

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

            response.Id.Should().Be(1);
            response.Type.Should().Be("A");
        }
Example #3
0
        public void MapEFToBO()
        {
            var      mapper = new DALPostTypeMapper();
            PostType entity = new PostType();

            entity.SetProperties(1, "A");

            BOPostType response = mapper.MapEFToBO(entity);

            response.Id.Should().Be(1);
            response.Type.Should().Be("A");
        }
Example #4
0
        public void MapBOToEF()
        {
            var mapper = new DALPostTypeMapper();
            var bo     = new BOPostType();

            bo.SetProperties(1, "A");

            PostType response = mapper.MapBOToEF(bo);

            response.Id.Should().Be(1);
            response.Type.Should().Be("A");
        }
Example #5
0
        public void MapBOToModelList()
        {
            var        mapper = new BOLPostTypeMapper();
            BOPostType bo     = new BOPostType();

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

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