public async Task Edit_Skill_Test() { SkillData data = new SkillData() { Id = "2", Description = "test 2", Title = "test 2", Category = "test 2" }; Assert.AreEqual(1, await skillService.EditSkill(data)); }
public async Task ExceptionTestFor_EditSkill_Fail() { try { _skill = null; var result = await _skillService.EditSkill(_skill); if (result == 1) { testResult = "ExceptionTestFor_EditSkill_Fail=" + "False"; fileUtility.WriteTestCaseResuItInText(testResult); // Write test case result in xml file if (config["env"] == "development") { cases newcase = new cases { TestCaseType = "Exception", Name = "ExceptionTestFor_EditSkill_Fail", expectedOutput = "False", weight = 5, mandatory = "False", desc = "na" }; await fileUtility.WriteTestCaseResuItInXML(newcase); } } else { Assert.NotEqual(1, result); } } catch (Exception exception) { var res = exception.Message; testResult = "ExceptionTestFor_EditSkill_Fail=" + "True"; fileUtility.WriteTestCaseResuItInText(testResult); // Write test case result in xml file if (config["env"] == "development") { cases newcase = new cases { TestCaseType = "Exception", Name = "ExceptionTestFor_EditSkill_Fail", expectedOutput = "True", weight = 5, mandatory = "True", desc = "na" }; await fileUtility.WriteTestCaseResuItInXML(newcase); } } }
public async Task EditSkill([FromBody] SkillData data) { await _service.EditSkill(data); }