using NUnit.Framework; public class MarkdownTest { [Test] public void Parses_normal_text_as_a_paragraph() { var input = "This will be a paragraph"; var expected = "

This will be a paragraph

"; Assert.That(Markdown.Parse(input), Is.EqualTo(expected)); } [Test] public void Parsing_italics() { var input = "_This will be italic_"; var expected = "

This will be italic

"; Assert.That(Markdown.Parse(input), Is.EqualTo(expected)); } [Test] public void Parsing_bold_text() { var input = "__This will be bold__"; var expected = "

This will be bold

"; Assert.That(Markdown.Parse(input), Is.EqualTo(expected)); } [Test] public void Mixed_normal_italics_and_bold_text() { var input = "This will _be_ __mixed__"; var expected = "

This will be mixed

"; Assert.That(Markdown.Parse(input), Is.EqualTo(expected)); } [Test] public void With_h1_header_level() { var input = "# This will be an h1"; var expected = "

This will be an h1

"; Assert.That(Markdown.Parse(input), Is.EqualTo(expected)); } [Test] public void With_h2_header_level() { var input = "## This will be an h2"; var expected = "

This will be an h2

"; Assert.That(Markdown.Parse(input), Is.EqualTo(expected)); } [Test] public void With_h6_header_level() { var input = "###### This will be an h6"; var expected = "
This will be an h6
"; Assert.That(Markdown.Parse(input), Is.EqualTo(expected)); } [Test] public void Unordered_lists() { var input = "* Item 1\n* Item 2"; var expected = ""; Assert.That(Markdown.Parse(input), Is.EqualTo(expected)); } [Test] public void With_a_little_bit_of_everything() { var input = "# Header!\n* __Bold Item__\n* _Italic Item_"; var expected = "

Header!

"; Assert.That(Markdown.Parse(input), Is.EqualTo(expected)); } }