public async Task GoodBestStoriesListResponseWithErrorResult()
        {
            _sequentialSetup
            .ReturnsAsync(new HttpResponseMessage
            {
                StatusCode = HttpStatusCode.BadRequest
            });

            _mockFactory.Setup(m => m.CreateClient(It.IsAny <string>()))
            .Returns(new HttpClient(_mockHttpMessageHandler.Object));

            var repository = new HackerNewsApiRepository(_configuration, _mockFactory.Object, _mockLogger.Object);

            Assert.Null(await repository.GetBestStories(), null);
        }
        public async Task ReturnsTwoIdsWithNoValidStories()
        {
            _sequentialSetup
            .ReturnsAsync(new HttpResponseMessage
            {
                StatusCode = HttpStatusCode.OK,
                Content    = new StringContent("[10,11]"),
            });

            _mockFactory.Setup(m => m.CreateClient(It.IsAny <string>()))
            .Returns(new HttpClient(_mockHttpMessageHandler.Object));

            var repository = new HackerNewsApiRepository(_configuration, _mockFactory.Object, _mockLogger.Object);

            Assert.Null(await repository.GetBestStories(), null);
        }
        public async Task ReturnsTwentyTwoIdsWithOnlyTwoStories()
        {
            _sequentialSetup
            .ReturnsAsync(new HttpResponseMessage
            {
                StatusCode = HttpStatusCode.OK,
                Content    = new StringContent("[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22]"),
            });

            SetArticlesMock();

            _mockFactory.Setup(m => m.CreateClient(It.IsAny <string>()))
            .Returns(new HttpClient(_mockHttpMessageHandler.Object));

            var repository = new HackerNewsApiRepository(_configuration, _mockFactory.Object, _mockLogger.Object);

            Assert.AreEqual((await repository.GetBestStories()).Count, 1);
        }