public void ParseLinks_MissingProtocol_MissingSubDomain_ValidTLD_CreateLink() { const string tweet = "sometext ghostmonk.com/somemorestuff"; const string expectedResult = "sometext <a href='http://ghostmonk.com/somemorestuff' target='_blank'>ghostmonk.com/somemorestuff</a>"; Assert.AreEqual(expectedResult, TweetParser.ParseLinks(tweet)); }
public void ParseLinks_MissingProtocol_CreateLink() { const string tweet = "sometext www.ghostmonk.com/somemorestuff.html"; const string expectedResult = "sometext <a href='http://www.ghostmonk.com/somemorestuff.html' target='_blank'>www.ghostmonk.com/somemorestuff.html</a>"; Assert.AreEqual(expectedResult, TweetParser.ParseLinks(tweet)); }