Inheritance: ITwitterService
Ejemplo n.º 1
0
        public void GetTweets_Can_Successfully_Retrieve_Values_From_Twitter()
        {
            var query = "#ltnet";
            var twitterService = new TwitterService();

            var tweets = twitterService.GetTweets(query, this.date);

            Assert.That(tweets.Count(), Is.GreaterThan(0));
        }
Ejemplo n.º 2
0
        public void GetTweers_Returns_Empty_List_When_No_Results_Found()
        {
            var empty = 0;
            var query = "#hashtagfortesting";
            var twitterService = new TwitterService();

            var tweets = twitterService.GetTweets(query, this.date);

            Assert.AreEqual(empty, tweets.Count());
        }
Ejemplo n.º 3
0
        public void GetTweers_Returns_Empty_List_When_Internal_Exception_Happens()
        {
            var empty = 0;
            string query = null;
            var twitterService = new TwitterService();

            var tweets = twitterService.GetTweets(query, this.date);

            Assert.AreEqual(empty, tweets.Count());
        }
Ejemplo n.º 4
0
        public void Given_Last_Tweet_Date_GetTweets_Can_Successfully_Retrieve_Latest_Values_From_Twitter()
        {
            var query = "#ltnet";
            var twitterService = new TwitterService();

            var tweets = twitterService.GetTweets(query, this.date).ToList();
            if (tweets.Count() > 1)
            {
                var fromDate = tweets.Last().Published;
                var latestTweets = twitterService.GetTweets(query, fromDate);

                Assert.That(tweets.Count(), Is.GreaterThan(latestTweets.Count()));
            }
        }