Beispiel #1
0
        public HttpResponseMessage GetSkill([FromBody] SkillModel skill)
        {
            SkillModel result = new SkillModel();

            try
            {
                var res = _skillsService.GetSkill(skill.Skill_Id);
                result = Helper.CastObject <SkillModel>(res);
            }
            catch (Exception ex)
            {
                _logManager.WriteLog(ex);
            }
            return(ToJson(result));
        }
        public void GetSkill()
        {
            var input = new Skill
            {
                Skill_Id         = 1,
                Skill_Name       = "HTML5",
                Associate_Skills = null
            };
            var skill = skillsService.GetSkill(input.Skill_Id);

            if (skill == null)
            {
                Assert.Null(skill);
            }
            Assert.NotNull(skill);
            Assert.AreEqual(skill.Skill_Id, input.Skill_Id);
        }