Пример #1
0
        public void TweetToHtmlFormatUsernames()
        {
            var text = "RT @topascz: Test tweet";
            var tweet = new Tweet(new TwitterUser(null, null, null, null, null, 0, 0, 0), text, DateTime.MinValue, String.Empty);

            Assert.Equal("RT <a href=\"https://www.twitter.com/topascz\">@topascz</a>: Test tweet", tweet.TextToHtmlString().ToString());
        }
Пример #2
0
        public void TweetToHtmlFormatNotUsernames()
        {
            var text = "Some email [email protected] @123";
            var tweet = new Tweet(new TwitterUser(null, null, null, null, null, 0, 0, 0), text, DateTime.MinValue, String.Empty);

            Assert.Equal("Some email [email protected] @123", tweet.TextToHtmlString().ToString());
        }
Пример #3
0
        public void TweetToHtmlFormatNotLink()
        {
            var text = "Testing link www.twitter.com";
            var tweet = new Tweet(new TwitterUser(null, null, null, null, null, 0, 0, 0), text, DateTime.MinValue, String.Empty);

            Assert.Equal("Testing link www.twitter.com", tweet.TextToHtmlString().ToString());
        }
Пример #4
0
        public void TweetToHtmlFormatNotHashtags()
        {
            var text = "Next test#test";
            var tweet = new Tweet(new TwitterUser(null, null, null, null, null, 0, 0, 0), text, DateTime.MinValue, String.Empty);

            Assert.Equal("Next test#test", tweet.TextToHtmlString().ToString());
        }
Пример #5
0
        public void TweetToHtmlFormatHttpsLink()
        {
            var text = "Testing link https://www.twitter.com";
            var tweet = new Tweet(new TwitterUser(null, null, null, null, null, 0, 0, 0), text, DateTime.MinValue, String.Empty);

            Assert.Equal("Testing link <a href=\"https://www.twitter.com\">https://www.twitter.com</a>", tweet.TextToHtmlString().ToString());
        }
Пример #6
0
        public void TweetToHtmlFormatHashtags()
        {
            var text = "Next #test #like";
            var tweet = new Tweet(new TwitterUser(null, null, null, null, null, 0, 0, 0), text, DateTime.MinValue, String.Empty);

            Assert.Equal("Next <a href=\"https://www.twitter.com/search/#test\">#test</a> <a href=\"https://www.twitter.com/search/#like\">#like</a>", tweet.TextToHtmlString().ToString());
        }