Beispiel #1
0
        public async Task Given_DeleteExam_When_IdIsValid_Then_OkStatusCode()
        {
            //Arrange

            /*mockRepo
             * .Setup(e => e.Delete(It.IsAny<Guid>()))
             * .ReturnsAsync(true);
             */
            mockRepo
            .Setup(u => u.FindById(It.IsAny <Guid>()))
            .ReturnsAsync(new ExamDetailsModel());

            //Act
            var result = await controller.DeleteExam(It.IsAny <Guid>());

            //Assert
            Assert.IsType <OkObjectResult>(result);
        }