Beispiel #1
0
        public async Task GetPostById_ReturnsOk()
        {
            // Arrange
            var post = GenerateFake.Post();

            _mockRepo.Setup(repo => repo.GetPostById(post.Id))
            .ReturnsAsync(post);

            // Act
            var response = await _postController.GetPostById(post.Id);

            // Assert
            Assert.IsAssignableFrom <ObjectResult>(response);
        }