private string Step10_RecommendForHire() { // 10 Recommend one interview candidate for hire //Arrange //Arrange string result = ""; InterviewResult outcome = new InterviewResult() { Operate = "Recommend", SchoolYear = _schoolYear, PositionID = _positionId.ToString(), UserID = _principalId, CPNum = _cpNum, Acceptance = "1", OutCome = "6", // interview Recommendation = "Principal interview comments from full testing process interview step 9", InterviewDate = DateFC.YMD(DateTime.Now), EffectiveDate = DateFC.YMD(DateTime.Now), }; var parameter = new { Operate = "", SchoolYear = _schoolYear, PositionID = _positionId }; //Act string expect = "Successfully"; List <ApplicantListSelect> interviewlist = SelectCandidateExe.Applicants(parameter); foreach (ApplicantListSelect applicant in interviewlist) { string teachername = applicant.TeacherName; outcome.CPNum = applicant.CPNum; if (outcome.Acceptance == "1" && outcome.OutCome == "6") { result = InterviewProcessExe.Recommend(outcome); _hiredCpNum = outcome.CPNum; break; } } //Assert Assert.AreEqual(expect, result, $" Recommented for hire of { outcome.CPNum } "); return(result); }
private string Step9_InterviewCandidats_Result() { // 9. candidate interview outcome //Arrange string result = ""; InterviewResult outcome = new InterviewResult() { Operate = "Update", SchoolYear = _schoolYear, PositionID = _positionId.ToString(), UserID = _principalId, CPNum = _cpNum, Acceptance = "1", OutCome = "6", // interview Recommendation = "Principal interview comments from full testing process interview step 9", InterviewDate = DateFC.YMD(DateTime.Now), EffectiveDate = DateFC.YMD(DateTime.Now), }; var parameter = new { Operate = "IncludeAll", SchoolYear = _schoolYear, PositionID = _positionId }; List <ApplicantListSelect> interviewlist = SelectCandidateExe.Applicants(parameter); foreach (ApplicantListSelect applicant in interviewlist) { string teachername = applicant.TeacherName; outcome.CPNum = applicant.CPNum; result = InterviewProcessExe.Update(outcome); } //Act string expect = "Successfully"; //Assert Assert.AreEqual(expect, result, $" Interview outcome update result "); return(expect); }