public void Export() { ControlExporter exporter = new ControlExporter(); JsonTextWriter writer = new JsonTextWriter(); HtmlGenericControl span = new HtmlGenericControl("span"); span.InnerText = "Happy & shiny people!"; exporter.Export(new ExportContext(), span, writer); Assert.AreEqual("[\"<span>Happy & shiny people!<\\/span>\"]", writer.ToString()); }
public void Export() { ControlExporter exporter = new ControlExporter(); JsonTextWriter writer = new JsonTextWriter(); HtmlGenericControl span = new HtmlGenericControl("span"); span.InnerText = "Happy & shiny people!"; exporter.Export(new ExportContext(), span, writer); Assert.AreEqual("[\"<span>Happy & shiny people!<\\/span>\"]", writer.ToString()); }