Beispiel #1
0
        public async Task <ActionResult> Create(AnswerModel answer)
        {
            var answerDto = _mapper.Map <Answer>(answer);
            await _answerManager.Create(answerDto);

            return(Ok());
        }
Beispiel #2
0
        public async Task GivenAnswer_WhenCreate_ThenCreateSuccessful()
        {
            //?Given
            var answer = GetAnswer();

            //?When
            await _answerManager.Create(answer);

            //?Then
            _mockAnswerReposotory.Verify(t => t.Create(It.Is <Answer>(e => AnswerIsWellCreated(e, answer))), Times.Once);
        }