Beispiel #1
0
        public void TestPaginateArticlesAtEnd()
        {
            var storyIDs = Enumerable.Range(100, 500);

            var nextPage = HackerNewsClient.PaginateArticles(storyIDs, 590);

            Assert.Equal(9, nextPage.Count());
            Assert.Equal(591, nextPage.First());
            Assert.Equal(599, nextPage.Last());
        }
Beispiel #2
0
        public void TestPaginateArticlesFromStart()
        {
            var storyIDs = Enumerable.Range(100, 500);

            var nextPage = HackerNewsClient.PaginateArticles(storyIDs, null);

            Assert.Equal(20, nextPage.Count());
            Assert.Equal(100, nextPage.First());
            Assert.Equal(119, nextPage.Last());
        }