public async Task UpdateQuestion() { Context .Setup(x => x.GetCurrentUserAsync()) .ReturnsAsync(ModelsCreationHelper.CreateLecturer); RepositoryQuestion .Setup(x => x.FindFirstAsync(It.IsAny <ISpecification <DatabaseQuestion> >())) .ReturnsAsync(ModelsCreationHelper.CreateDatabaseQuestion()); await ServiceQuestion.UpdateQuestionAsync(999, new Question()); }
public async Task <IActionResult> UpdateQuestion([FromRoute] int id, [FromBody] Question question) { return(await Ok(() => _serviceQuestion.UpdateQuestionAsync(id, question))); }