public void test_normal2() { SimpleTag st = new SimpleTag("x"); string bbcode = "[z]foo[/z]"; string expected = "<x>foo</x>"; string actual = BBCode.ToHtml(bbcode, new Dictionary<string, BaseTagHandler> { {"z", st} }); Assert.AreEqual(expected, actual); }
public void test_attributes() { SimpleTag st = new SimpleTag("b", "style=\"display:none\""); string bbcode = "[b]foo[/b]"; string expected = "<b style=\"display:none\">foo</b>"; string actual = BBCode.ToHtml(bbcode, new Dictionary<string, BaseTagHandler> { {"b", st} }); Assert.AreEqual(expected, actual); }