public void test_without_value() { ColorTag ct = new ColorTag(); string bbcode = "[color]foo[/color]"; string expected = "foo"; string actual = BBCode.ToHtml(bbcode, new Dictionary<string, BaseTagHandler> { {"color", ct} }); Assert.AreEqual(expected, actual); }
public void test_normal() { ColorTag ct = new ColorTag(); string bbcode = "[color=red]foo[/color]"; string expected = "<span style=\"color:red;\">foo</span>"; string actual = BBCode.ToHtml(bbcode, new Dictionary<string, BaseTagHandler> { {"color", ct} }); Assert.AreEqual(expected, actual); }