public async Task GetQuestion_Student_NoAccess() { Context .Setup(x => x.GetCurrentUserAsync()) .ReturnsAsync(ModelsCreationHelper.CreateStudent); await Assert.ThrowsAsync <EducationSystemPublicException> (() => ServiceQuestion.GetQuestionAsync(999)); }
public async Task <IActionResult> GetQuestion([FromRoute] int id) { return(await Ok(() => _serviceQuestion.GetQuestionAsync(id))); }