public void WriteHTMLForNote() { Note note = Note.CreateNewNote("Test Title", "note://tomboy/foo", null); note.XmlContent = "<note-content>Test Title\n\nSome text</note-content>"; ExportToHTMLPlugin plugin = new ExportToHTMLPlugin(); StringWriter writer = new StringWriter(); plugin.WriteHTMLForNote(writer, note, false); Assert.AreEqual(html_text, writer.ToString()); }
public void WriteHTMLForNoteWithNonAsciiCharacters() { // Test with non-ASCII characters as well to make sure // all buffers are large enough to process multi-byte // characters. Note note = Note.CreateNewNote("Test Title", "note://tomboy/foo", null); note.XmlContent = "<note-content>Test \u00c4 Title\n\nSome text with arabian characters: \u062b\u0642\u06cd.</note-content>"; ExportToHTMLPlugin plugin = new ExportToHTMLPlugin(); StringWriter writer = new StringWriter(); plugin.WriteHTMLForNote(writer, note, false); Assert.AreEqual(html_non_ascii_text, writer.ToString()); }
public void WriteHTMLForNote () { Note note = Note.CreateNewNote ("Test Title", "note://tomboy/foo", null); note.XmlContent = "<note-content>Test Title\n\nSome text</note-content>"; ExportToHTMLPlugin plugin = new ExportToHTMLPlugin (); StringWriter writer = new StringWriter (); plugin.WriteHTMLForNote (writer, note, false); Assert.AreEqual (html_text, writer.ToString ()); }
public void WriteHTMLForNoteWithNonAsciiCharacters () { // Test with non-ASCII characters as well to make sure // all buffers are large enough to process multi-byte // characters. Note note = Note.CreateNewNote ("Test Title", "note://tomboy/foo", null); note.XmlContent = "<note-content>Test \u00c4 Title\n\nSome text with arabian characters: \u062b\u0642\u06cd.</note-content>"; ExportToHTMLPlugin plugin = new ExportToHTMLPlugin (); StringWriter writer = new StringWriter (); plugin.WriteHTMLForNote (writer, note, false); Assert.AreEqual (html_non_ascii_text, writer.ToString ()); }