Пример #1
0
        public async Task <bool> Testfor_ValidateInterviewId()
        {
            //Arrange
            bool res = false;

            //Act
            service.Setup(repo => repo.AddInterview(_interview)).ReturnsAsync(_interview);
            var result = await _interviewTS.AddInterview(_interview);

            if (result.InterviewId >= 1 && result.InterviewId <= 350000)
            {
                res = true;
            }
            //Asert
            //final result displaying in text file
            File.AppendAllText("../../../output_boundary_revised.txt", "Testfor_ValidateInterviewId=" + res + "\n");
            return(res);
        }
        public async Task <bool> Testfor_Validate_InValid_AddInterview()
        {
            //Arrange
            bool res = false;

            _interview = null;
            //Act
            service.Setup(repo => repo.AddInterview(_interview)).ReturnsAsync(_interview);
            var result = await _interviewTS.AddInterview(_interview);

            if (result == null)
            {
                res = true;
            }
            //Asert
            //final result displaying in text file
            File.AppendAllText("../../../output_exception_revised.txt", "Testfor_Validate_InValid_AddInterview=" + res + "\n");
            return(res);
        }