コード例 #1
0
        public async Task GetNewStoriesTest()
        {
            IEnumerable <int> storyIds = await _hackerNewsAPI.GetNewStoriesAsync();

            Assert.True(storyIds != null, "Un-instatiated collection returned");

            Assert.True(storyIds.Any(), "Empty resultset");

            foreach (int id in storyIds)
            {
                Assert.True(id > 0, "Invalid Id");
            }
        }