Skip to content

Commit 1fcedc6

Browse files
authored
assertEquals converted to assertThat for MarkdownTest (exercism#2202)
1 parent 1554897 commit 1fcedc6

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

exercises/practice/markdown/src/test/java/MarkdownTest.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import org.junit.Ignore;
33
import org.junit.Test;
44

5-
import static org.junit.Assert.assertEquals;
5+
import static org.assertj.core.api.Assertions.assertThat;
66

77
public class MarkdownTest {
88

@@ -18,7 +18,7 @@ public void normalTextAsAParagraph() {
1818
String input = "This will be a paragraph";
1919
String expected = "<p>This will be a paragraph</p>";
2020

21-
assertEquals(expected, markdown.parse(input));
21+
assertThat(markdown.parse(input)).isEqualTo(expected);
2222
}
2323

2424
@Ignore("Remove to run test")
@@ -27,7 +27,7 @@ public void italics() {
2727
String input = "_This will be italic_";
2828
String expected = "<p><em>This will be italic</em></p>";
2929

30-
assertEquals(expected, markdown.parse(input));
30+
assertThat(markdown.parse(input)).isEqualTo(expected);
3131
}
3232

3333
@Ignore("Remove to run test")
@@ -36,7 +36,7 @@ public void boldText() {
3636
String input = "__This will be bold__";
3737
String expected = "<p><strong>This will be bold</strong></p>";
3838

39-
assertEquals(expected, markdown.parse(input));
39+
assertThat(markdown.parse(input)).isEqualTo(expected);
4040
}
4141

4242
@Ignore("Remove to run test")
@@ -45,7 +45,7 @@ public void normalItalicsAndBoldText() {
4545
String input = "This will _be_ __mixed__";
4646
String expected = "<p>This will <em>be</em> <strong>mixed</strong></p>";
4747

48-
assertEquals(expected, markdown.parse(input));
48+
assertThat(markdown.parse(input)).isEqualTo(expected);
4949
}
5050

5151
@Ignore("Remove to run test")
@@ -54,7 +54,7 @@ public void withH1HeaderLevel() {
5454
String input = "# This will be an h1";
5555
String expected = "<h1>This will be an h1</h1>";
5656

57-
assertEquals(expected, markdown.parse(input));
57+
assertThat(markdown.parse(input)).isEqualTo(expected);
5858
}
5959

6060
@Ignore("Remove to run test")
@@ -63,7 +63,7 @@ public void withH2HeaderLevel() {
6363
String input = "## This will be an h2";
6464
String expected = "<h2>This will be an h2</h2>";
6565

66-
assertEquals(expected, markdown.parse(input));
66+
assertThat(markdown.parse(input)).isEqualTo(expected);
6767
}
6868

6969
@Ignore("Remove to run test")
@@ -72,7 +72,7 @@ public void withH6HeaderLevel() {
7272
String input = "###### This will be an h6";
7373
String expected = "<h6>This will be an h6</h6>";
7474

75-
assertEquals(expected, markdown.parse(input));
75+
assertThat(markdown.parse(input)).isEqualTo(expected);
7676
}
7777

7878
@Ignore("Remove to run test")
@@ -81,7 +81,7 @@ public void unorderedLists() {
8181
String input = "* Item 1\n* Item 2";
8282
String expected = "<ul><li>Item 1</li><li>Item 2</li></ul>";
8383

84-
assertEquals(expected, markdown.parse(input));
84+
assertThat(markdown.parse(input)).isEqualTo(expected);
8585
}
8686

8787
@Ignore("Remove to run test")
@@ -90,7 +90,7 @@ public void aLittleBitOfEverything() {
9090
String input = "# Header!\n* __Bold Item__\n* _Italic Item_";
9191
String expected = "<h1>Header!</h1><ul><li><strong>Bold Item</strong></li><li><em>Italic Item</em></li></ul>";
9292

93-
assertEquals(expected, markdown.parse(input));
93+
assertThat(markdown.parse(input)).isEqualTo(expected);
9494
}
9595

9696
@Ignore("Remove to run test")
@@ -99,7 +99,7 @@ public void markdownSymbolsInTheHeaderShouldNotBeInterpreted() {
9999
String input = "# This is a header with # and * in the text";
100100
String expected = "<h1>This is a header with # and * in the text</h1>";
101101

102-
assertEquals(expected, markdown.parse(input));
102+
assertThat(markdown.parse(input)).isEqualTo(expected);
103103
}
104104

105105
@Ignore("Remove to run test")
@@ -108,7 +108,7 @@ public void markdownSymbolsInTheListItemTextShouldNotBeInterpreted() {
108108
String input = "* Item 1 with a # in the text\n* Item 2 with * in the text";
109109
String expected = "<ul><li>Item 1 with a # in the text</li><li>Item 2 with * in the text</li></ul>";
110110

111-
assertEquals(expected, markdown.parse(input));
111+
assertThat(markdown.parse(input)).isEqualTo(expected);
112112
}
113113

114114
@Ignore("Remove to run test")
@@ -117,7 +117,7 @@ public void markdownSymbolsInTheParagraphTextShouldNotBeInterpreted() {
117117
String input = "This is a paragraph with # and * in the text";
118118
String expected = "<p>This is a paragraph with # and * in the text</p>";
119119

120-
assertEquals(expected, markdown.parse(input));
120+
assertThat(markdown.parse(input)).isEqualTo(expected);
121121
}
122122

123123
@Ignore("Remove to run test")
@@ -126,7 +126,7 @@ public void markdownUnorderedListsCloseProperlyWithPrecedingAndFollowingLines()
126126
String input = "# Start a list\n* Item 1\n* Item 2\nEnd a list";
127127
String expected = "<h1>Start a list</h1><ul><li>Item 1</li><li>Item 2</li></ul><p>End a list</p>";
128128

129-
assertEquals(expected, markdown.parse(input));
129+
assertThat(markdown.parse(input)).isEqualTo(expected);
130130
}
131131

132132
}

0 commit comments

Comments
 (0)