From d83aeb1a2becd89d190f5c2ee35d1da2d2d9670f Mon Sep 17 00:00:00 2001 From: Sean McGarry Date: Wed, 16 Nov 2022 15:34:44 +0000 Subject: [PATCH] assertEquals converted to assertThat for MarkdownTest --- .../markdown/src/test/java/MarkdownTest.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/exercises/practice/markdown/src/test/java/MarkdownTest.java b/exercises/practice/markdown/src/test/java/MarkdownTest.java index 6cb104bc8..89049da53 100644 --- a/exercises/practice/markdown/src/test/java/MarkdownTest.java +++ b/exercises/practice/markdown/src/test/java/MarkdownTest.java @@ -2,7 +2,7 @@ import org.junit.Ignore; import org.junit.Test; -import static org.junit.Assert.assertEquals; +import static org.assertj.core.api.Assertions.assertThat; public class MarkdownTest { @@ -18,7 +18,7 @@ public void normalTextAsAParagraph() { String input = "This will be a paragraph"; String expected = "

This will be a paragraph

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

This will be italic

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

This will be bold

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

This will be mixed

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

This will be an h1

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

This will be an h2

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

Header!

"; - assertEquals(expected, markdown.parse(input)); + assertThat(markdown.parse(input)).isEqualTo(expected); } @Ignore("Remove to run test") @@ -99,7 +99,7 @@ public void markdownSymbolsInTheHeaderShouldNotBeInterpreted() { String input = "# This is a header with # and * in the text"; String expected = "

This is a header with # and * in the text

"; - assertEquals(expected, markdown.parse(input)); + assertThat(markdown.parse(input)).isEqualTo(expected); } @Ignore("Remove to run test") @@ -108,7 +108,7 @@ public void markdownSymbolsInTheListItemTextShouldNotBeInterpreted() { String input = "* Item 1 with a # in the text\n* Item 2 with * in the text"; String expected = ""; - assertEquals(expected, markdown.parse(input)); + assertThat(markdown.parse(input)).isEqualTo(expected); } @Ignore("Remove to run test") @@ -117,7 +117,7 @@ public void markdownSymbolsInTheParagraphTextShouldNotBeInterpreted() { String input = "This is a paragraph with # and * in the text"; String expected = "

This is a paragraph with # and * in the text

"; - assertEquals(expected, markdown.parse(input)); + assertThat(markdown.parse(input)).isEqualTo(expected); } @Ignore("Remove to run test") @@ -126,7 +126,7 @@ public void markdownUnorderedListsCloseProperlyWithPrecedingAndFollowingLines() String input = "# Start a list\n* Item 1\n* Item 2\nEnd a list"; String expected = "

Start a list

End a list

"; - assertEquals(expected, markdown.parse(input)); + assertThat(markdown.parse(input)).isEqualTo(expected); } }