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

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

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

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

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

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

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