import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import static org.junit.Assert.assertEquals; public class MarkdownTest { private Markdown markdown; @Before public void setup() { markdown = new Markdown(); } @Test public void normalTextAsAParagraph() { String input = "This will be a paragraph"; String expected = "

This will be a paragraph

"; assertEquals(expected, markdown.parse(input)); } @Ignore("Remove to run test") @Test public void italics() { String input = "_This will be italic_"; String expected = "

This will be italic

"; assertEquals(expected, markdown.parse(input)); } @Ignore("Remove to run test") @Test public void boldText() { String input = "__This will be bold__"; String expected = "

This will be bold

"; assertEquals(expected, markdown.parse(input)); } @Ignore("Remove to run test") @Test public void normalItalicsAndBoldText() { String input = "This will _be_ __mixed__"; String expected = "

This will be mixed

"; assertEquals(expected, markdown.parse(input)); } @Ignore("Remove to run test") @Test public void withH1HeaderLevel() { String input = "# This will be an h1"; String expected = "

This will be an h1

"; assertEquals(expected, markdown.parse(input)); } @Ignore("Remove to run test") @Test public void withH2HeaderLevel() { String input = "## This will be an h2"; String expected = "

This will be an h2

"; assertEquals(expected, markdown.parse(input)); } @Ignore("Remove to run test") @Test public void withH6HeaderLevel() { String input = "###### This will be an h6"; String expected = "
This will be an h6
"; assertEquals(expected, markdown.parse(input)); } @Ignore("Remove to run test") @Test public void unorderedLists() { String input = "* Item 1\n* Item 2"; String expected = ""; assertEquals(expected, markdown.parse(input)); } @Ignore("Remove to run test") @Test public void aLittleBitOfEverything() { String input = "# Header!\n* __Bold Item__\n* _Italic Item_"; String expected = "

Header!

"; assertEquals(expected, markdown.parse(input)); } }