Ejemplo n.º 1
0
 public void WikiLinksCannotAppearInTheMiddleOfOtherWords()
 {
     WikiPage page = new WikiPage("PageName", "This should notBeLinked.", 0);
     AssertContainsString(page.AsHtml(),"should notBeLinked.");
     AssertContainsString( false, page.AsHtml(), "<a");
 }
Ejemplo n.º 2
0
 public void WikiLinksCanAppearAtTheStartOfTheContent()
 {
     WikiPage page = new WikiPage("PageName", "ThisLink should be a link.", 0);
     AssertContainsString(page.AsHtml(), "<a href=\"ThisLink.html\">ThisLink</a>");
 }
Ejemplo n.º 3
0
 public void ShowsTheLastUpdatedTime()
 {
     WikiPage page = new WikiPage("PageName", "Some text.", new DateTime(2010, 4, 25, 13, 17,0).Ticks);
     AssertContainsString(page.AsHtml(),"<i>Last Updated: 4/25/2010 1:17 PM</i>");
 }
Ejemplo n.º 4
0
 public void TransformsWordsSmashedTogetherIntoWikiLinks()
 {
     WikiPage page = new WikiPage("PageName", "Link to AnotherPage.", 0);
     AssertContainsString(page.AsHtml(),"Link to <a href=\"AnotherPage.html\">AnotherPage</a>.");
 }
Ejemplo n.º 5
0
 public void HtmlContentIncludesTitleAndText()
 {
     WikiPage page = new WikiPage("ThePageName", "Some random text.", 0);
     AssertContainsString(page.AsHtml(),"<h1>ThePageName</h1>");
     AssertContainsString(page.AsHtml(),"Some random text.");
 }