コード例 #1
0
        public async Task HackerNewsApiService_FetchNewestStoryIds_FetchStoriesForValidUrl()
        {
            var storyIds = await _hackerNewsApiService.FetchNewestStoryIds();

            Assert.IsTrue(storyIds.Any());
        }
コード例 #2
0
        public async Task HackerNewsApiService_FetchNewestStoryIds_FetchStoriesForInvalidUrl()
        {
            _hackerNewsApiService = new HackerNewsApiService(new HttpClient(), ConfigurationHelper.GetBadTestConfiguration());

            var stories = await _hackerNewsApiService.FetchNewestStoryIds();
        }
コード例 #3
0
        public async Task HackerNewsApiService_FetchNewestStoryIds_EmptyApiUrl()
        {
            _hackerNewsApiService = new HackerNewsApiService(new HttpClient(), ConfigurationHelper.GetEmptyConfiguration());

            await _hackerNewsApiService.FetchNewestStoryIds();
        }