예제 #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());
        }