private void btnLink_Click(object sender, EventArgs e) { HtmlLink link = new HtmlLink(); link.Href = "http://www.google.com"; link.Title = "Google'a git!"; link.Value = "Google Sayfası"; txtHtmlKod.AppendText(link.GetHtmlString()); txtHtmlKod.AppendText(Environment.NewLine); }
public void Check_if_Link_tag_returns_correct_html() { HtmlLink lnk = new HtmlLink(); lnk.LinkSrc = "www.google.com"; lnk.LinkText = "google"; string genHtml = lnk.GetHtmlString(); string expectedHtml = "<a href='www.google.com'>google</a>"; Assert.AreEqual(expectedHtml, genHtml); }