/// <summary> /// Not avaiable in twitter v2 api yet /// </summary> //[Test] public void ParseEntityUrls() { var tweetAct = TwitterDataDTO.Deserialize(entityTweet); // v2 resurrect this test //Assert.AreEqual(2, tweetAct.Entities?.Urls?.Count); }
public void DeserializeComplex() { var tweetAct = TwitterDataDTO.Deserialize(complexTweet); // v2 more DRY Assert.AreEqual("asdadfsdsdf f3456@$%$^", tweetAct.Id); Assert.AreEqual("rt @nicogonza_988: te gusta cómo la cómo? 😈💦\nsuscríbete y mira el vídeo https://t.co/gzSoZqPmDM completo en mi only.\ncontenido exclusivo y personalizado ⚡️\n\nhttps…", tweetAct.Text); }
public void DeserializeSimple() { var tweetAct = TwitterDataDTO.Deserialize(simpleTweet); Assert.AreEqual("20", tweetAct.Id); Assert.AreEqual("just setting up my twttr", tweetAct.Text); Assert.AreEqual(null, tweetAct.Entities); }
// need to fix //[Test] public void TestTotalCount() { const int maxTweets = 100000; var stats = new Statistics(); // int.MaxValue (2 bn) took 2 mins, so cutting down for (int i = 0; i < maxTweets; i++) { var tweetData = new TwitterDataDTO(RandomInt().ToString(), RandomString(TwitterDataDTO.MaxTextSize)); var tweet = new TwitterTweetDTO(tweetData, null); //stats.Process(tweet); } Assert.AreEqual(stats.Total, maxTweets); }