public async Task AddExamQuestion_AddQuestionToExam_ReturnsNewExamQuestion() { //Assert var examId = AutoFaker.Generate <int>(); var questionId = AutoFaker.Generate <int>(); var examQuestion = AutoFaker.Generate <ExamQuestion>(); _askmeRepository.Setup(x => x.AddExamQuestion(It.IsAny <int>(), It.IsAny <int>())) .ReturnsAsync(examQuestion); //Act var result = await _sut.AddExamQuestion(examId, questionId); //Assert result.Should().BeOfType <ExamQuestion>(); result.Should().BeEquivalentTo(examQuestion); }