public async Task <bool> TestFor_DeleteInterview() { //Arrange var res = false; service.Setup(repo => repo.AddInterview(_interview)).ReturnsAsync(_interview); var result = await _interviewTS.AddInterview(_interview); //Action service.Setup(repos => repos.DeleteInterviewById(result.InterviewId)).ReturnsAsync(true); var resultDelete = await _interviewTS.DeleteInterviewById(result.InterviewId); //Assertion if (resultDelete == true) { res = true; } //final result displaying in text file File.AppendAllText("../../../output_revised.txt", "TestFor_DeleteInterview=" + res + "\n"); return(res); }
public async Task <bool> Testfor_Validate_InValid_DeleteInterview() { //Arrange var res = false; var _interview = new Interview() { }; //Action service.Setup(repos => repos.DeleteInterviewById(_interview.InterviewId)).ReturnsAsync(true); var result = await _interviewTS.DeleteInterviewById(_interview.InterviewId); //Assertion if (result == true) { res = true; } //final result displaying in text file File.AppendAllText("../../../output_exception_revised.txt", "Testfor_Validate_InValid_DeleteInterview=" + res + "\n"); return(res); }