Beispiel #1
0
        public void CanSearchAPI()
        {
            NewsApi agg = new NewsApi();

            Assert.NotNull(agg);
            var r = agg.SearchAsync("Donald Trump", null, null).Result;

            Assert.NotEmpty(r);
            var now = DateTime.Now;

            r = agg.SearchAsync("China", now - TimeSpan.FromMinutes(5), now).Result;
            Assert.NotEmpty(r);
        }
Beispiel #2
0
        public void CanPageThroughResults()
        {
            NewsApi agg = new NewsApi();

            Assert.NotNull(agg);
            var now = DateTime.Now;
            var r   = agg.SearchAsync("Donald Trump", now - TimeSpan.FromDays(30), now).Result;
        }