Example #1
0
        public async Task UpdateLesson_ReturnsLessonUpdated()
        {
            //Arrange
            var answer    = AutoFaker.Generate <Answer>();
            var answerDto = AutoFaker.Generate <AnswerDto>();

            _mapper.Setup(x => x.Map <Answer>(answerDto))
            .Returns(answer);
            _answerService.Setup(x => x.UpdateAnswer(answer))
            .ReturnsAsync(true);

            //Act
            var result = await _sut.UpdateAnswer(answerDto);

            //Assert
            result.Should().BeOfType <NoContentResult>();
        }