public void test_wrong_value() { SizeTag st = new SizeTag(); string bbcode = "[size=foo]bar[/size]"; string expected = "bar"; string actual = BBCode.ToHtml(bbcode, new Dictionary<string, BaseTagHandler> { {"size", st} }); Assert.AreEqual(expected, actual); }
public void test_normal() { SizeTag st = new SizeTag(); string bbcode = "[size=12]foo[/size]"; string expected = "<span style=\"font-size:12pt;\">foo</span>"; string actual = BBCode.ToHtml(bbcode, new Dictionary<string, BaseTagHandler> { {"size", st} }); Assert.AreEqual(expected, actual); }