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

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

            response.Name.Should().Be("A");
        }
示例#2
0
        public void MapBOToModel()
        {
            var         mapper = new BOLVoteTypesMapper();
            BOVoteTypes bo     = new BOVoteTypes();

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

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
示例#3
0
        public void MapBOToModelList()
        {
            var         mapper = new BOLVoteTypesMapper();
            BOVoteTypes bo     = new BOVoteTypes();

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

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