public async Task GetAllIssues_With_An_Exception_Should_Return_StatusCode_500_Test()
            {
                // Arrange

                const string expectedLog   = "Something went wrong inside GetAllIssuesAsync action: Some Error";
                const string expectedValue = "Internal server error";

                IssueServiceMock
                .Setup(x => x.GetAllIssuesAsync())
                .ThrowsAsync(new Exception("Some Error"));

                // Act

                var result = await ControllerUnderTest.GetAllIssuesAsync();

                // Assert

                result.Should().BeOfType <ObjectResult>();
                LoggerMock.Invocations.Count.Should().Be(1);
                LoggerMock.Invocations[0].Arguments[2].ToString().Should().Contain(expectedLog);

                var content = (ObjectResult)result;

                content.StatusCode.Should().Be(500);
                content.Value.Should().Be(expectedValue);
            }
            public async Task GetAllAsync_Should_Return_OkObjectResult_With_a_List_of_IssueDtos_Test()
            {
                // Arrange

                var expectedIssues = new List <IssueDto>()
                {
                    new IssueDto()
                    {
                        Id = 1, IssueDescription = "Test 1", DateAdded = DateTimeOffset.Now
                    },
                    new IssueDto()
                    {
                        Id = 2, IssueDescription = "Test 2", DateAdded = DateTimeOffset.Now
                    },
                    new IssueDto()
                    {
                        Id = 3, IssueDescription = "Test 3", DateAdded = DateTimeOffset.Now
                    }
                };

                IssueServiceMock
                .Setup(x => x.GetAllIssuesAsync())
                .ReturnsAsync(expectedIssues);

                // Act

                var result = await ControllerUnderTest.GetAllIssuesAsync();

                // Assert

                var okResult = Assert.IsType <OkObjectResult>(result);

                Assert.Same(expectedIssues, okResult.Value);
            }