11import org .junit .jupiter .api .BeforeEach ;
22import org .junit .jupiter .api .Disabled ;
3+ import org .junit .jupiter .api .DisplayName ;
34import org .junit .jupiter .api .Test ;
45
56import static org .assertj .core .api .Assertions .assertThat ;
@@ -14,6 +15,7 @@ public void setup() {
1415 }
1516
1617 @ Test
18+ @ DisplayName ("Plain text is wrapped in a paragraph" )
1719 public void normalTextAsAParagraph () {
1820 String input = "This will be a paragraph" ;
1921 String expected = "<p>This will be a paragraph</p>" ;
@@ -23,6 +25,7 @@ public void normalTextAsAParagraph() {
2325
2426 @ Disabled ("Remove to run test" )
2527 @ Test
28+ @ DisplayName ("Single underscore wraps text in <em> tags" )
2629 public void italics () {
2730 String input = "_This will be italic_" ;
2831 String expected = "<p><em>This will be italic</em></p>" ;
@@ -32,6 +35,7 @@ public void italics() {
3235
3336 @ Disabled ("Remove to run test" )
3437 @ Test
38+ @ DisplayName ("Double underscore wraps text in <strong> tags" )
3539 public void boldText () {
3640 String input = "__This will be bold__" ;
3741 String expected = "<p><strong>This will be bold</strong></p>" ;
@@ -41,6 +45,7 @@ public void boldText() {
4145
4246 @ Disabled ("Remove to run test" )
4347 @ Test
48+ @ DisplayName ("Mixed italics and bold inline formatting" )
4449 public void normalItalicsAndBoldText () {
4550 String input = "This will _be_ __mixed__" ;
4651 String expected = "<p>This will <em>be</em> <strong>mixed</strong></p>" ;
@@ -50,6 +55,7 @@ public void normalItalicsAndBoldText() {
5055
5156 @ Disabled ("Remove to run test" )
5257 @ Test
58+ @ DisplayName ("H1 header conversion" )
5359 public void withH1HeaderLevel () {
5460 String input = "# This will be an h1" ;
5561 String expected = "<h1>This will be an h1</h1>" ;
@@ -59,6 +65,7 @@ public void withH1HeaderLevel() {
5965
6066 @ Disabled ("Remove to run test" )
6167 @ Test
68+ @ DisplayName ("H2 header conversion" )
6269 public void withH2HeaderLevel () {
6370 String input = "## This will be an h2" ;
6471 String expected = "<h2>This will be an h2</h2>" ;
@@ -68,6 +75,7 @@ public void withH2HeaderLevel() {
6875
6976 @ Disabled ("Remove to run test" )
7077 @ Test
78+ @ DisplayName ("H3 header conversion" )
7179 public void withH3HeaderLevel () {
7280 String input = "### This will be an h3" ;
7381 String expected = "<h3>This will be an h3</h3>" ;
@@ -77,6 +85,7 @@ public void withH3HeaderLevel() {
7785
7886 @ Disabled ("Remove to run test" )
7987 @ Test
88+ @ DisplayName ("H4 header conversion" )
8089 public void withH4HeaderLevel () {
8190 String input = "#### This will be an h4" ;
8291 String expected = "<h4>This will be an h4</h4>" ;
@@ -86,6 +95,7 @@ public void withH4HeaderLevel() {
8695
8796 @ Disabled ("Remove to run test" )
8897 @ Test
98+ @ DisplayName ("H5 header conversion" )
8999 public void withH5HeaderLevel () {
90100 String input = "##### This will be an h5" ;
91101 String expected = "<h5>This will be an h5</h5>" ;
@@ -95,6 +105,7 @@ public void withH5HeaderLevel() {
95105
96106 @ Disabled ("Remove to run test" )
97107 @ Test
108+ @ DisplayName ("H6 header conversion" )
98109 public void withH6HeaderLevel () {
99110 String input = "###### This will be an h6" ;
100111 String expected = "<h6>This will be an h6</h6>" ;
@@ -104,6 +115,7 @@ public void withH6HeaderLevel() {
104115
105116 @ Disabled ("Remove to run test" )
106117 @ Test
118+ @ DisplayName ("Line starting with 7 hashes is a paragraph" )
107119 public void h7HeaderLevelIsAParagraph () {
108120 String input = "####### This will not be an h7" ;
109121 String expected = "<p>####### This will not be an h7</p>" ;
@@ -113,6 +125,7 @@ public void h7HeaderLevelIsAParagraph() {
113125
114126 @ Disabled ("Remove to run test" )
115127 @ Test
128+ @ DisplayName ("Consecutive lines starting with * become an unordered list" )
116129 public void unorderedLists () {
117130 String input = "* Item 1\n * Item 2" ;
118131 String expected = "<ul><li>Item 1</li><li>Item 2</li></ul>" ;
@@ -122,6 +135,7 @@ public void unorderedLists() {
122135
123136 @ Disabled ("Remove to run test" )
124137 @ Test
138+ @ DisplayName ("Combined header and list formatting" )
125139 public void aLittleBitOfEverything () {
126140 String input = "# Header!\n * __Bold Item__\n * _Italic Item_" ;
127141 String expected = "<h1>Header!</h1><ul><li><strong>Bold Item</strong></li><li><em>Italic Item</em></li></ul>" ;
@@ -131,6 +145,7 @@ public void aLittleBitOfEverything() {
131145
132146 @ Disabled ("Remove to run test" )
133147 @ Test
148+ @ DisplayName ("Markdown symbols inside headers are treated as text" )
134149 public void markdownSymbolsInTheHeaderShouldNotBeInterpreted () {
135150 String input = "# This is a header with # and * in the text" ;
136151 String expected = "<h1>This is a header with # and * in the text</h1>" ;
@@ -140,6 +155,7 @@ public void markdownSymbolsInTheHeaderShouldNotBeInterpreted() {
140155
141156 @ Disabled ("Remove to run test" )
142157 @ Test
158+ @ DisplayName ("Markdown symbols inside list items are treated as text" )
143159 public void markdownSymbolsInTheListItemTextShouldNotBeInterpreted () {
144160 String input = "* Item 1 with a # in the text\n * Item 2 with * in the text" ;
145161 String expected = "<ul><li>Item 1 with a # in the text</li><li>Item 2 with * in the text</li></ul>" ;
@@ -149,6 +165,7 @@ public void markdownSymbolsInTheListItemTextShouldNotBeInterpreted() {
149165
150166 @ Disabled ("Remove to run test" )
151167 @ Test
168+ @ DisplayName ("Markdown symbols inside paragraphs are treated as text" )
152169 public void markdownSymbolsInTheParagraphTextShouldNotBeInterpreted () {
153170 String input = "This is a paragraph with # and * in the text" ;
154171 String expected = "<p>This is a paragraph with # and * in the text</p>" ;
@@ -158,6 +175,7 @@ public void markdownSymbolsInTheParagraphTextShouldNotBeInterpreted() {
158175
159176 @ Disabled ("Remove to run test" )
160177 @ Test
178+ @ DisplayName ("Lists close properly when surrounded by other blocks" )
161179 public void markdownUnorderedListsCloseProperlyWithPrecedingAndFollowingLines () {
162180 String input = "# Start a list\n * Item 1\n * Item 2\n End a list" ;
163181 String expected = "<h1>Start a list</h1><ul><li>Item 1</li><li>Item 2</li></ul><p>End a list</p>" ;
0 commit comments