From b0a146de5265fd6cbc40717710bb7b01592b0249 Mon Sep 17 00:00:00 2001 From: Jan Seeger Date: Tue, 16 Jul 2024 13:22:06 +0200 Subject: [PATCH] Split test cases up --- .../src/test/kotlin/MarkdownConverterTest.kt | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/dachlatten-markdown/src/test/kotlin/MarkdownConverterTest.kt b/dachlatten-markdown/src/test/kotlin/MarkdownConverterTest.kt index 0a57bac..06b1514 100644 --- a/dachlatten-markdown/src/test/kotlin/MarkdownConverterTest.kt +++ b/dachlatten-markdown/src/test/kotlin/MarkdownConverterTest.kt @@ -95,7 +95,7 @@ class MarkdownConverterTest { } @Test - fun checkH1HeadlinesWork() { + fun checkHeadlineWithParagraphWorks() { val markdownWithH1Headline = "some asdf\n\n# headline" val parsedText = parseMarkdown(markdownWithH1Headline) @@ -103,40 +103,49 @@ class MarkdownConverterTest { assertEquals("some asdf\n\nheadline", parsedText.text) } + @Test + fun checkH1HeadlinesWork() { + val markdownWithH1Headline = "# headline" + + val parsedText = parseMarkdown(markdownWithH1Headline) + + assertEquals("headline", parsedText.text) + } + @Test fun checkH2HeadlinesWork() { - val markdownWithH2Headline = "some asdf\n\n## headline" + val markdownWithH2Headline = "## headline" val parsedText = parseMarkdown(markdownWithH2Headline) - assertEquals("some asdf\n\nheadline", parsedText.text) + assertEquals("headline", parsedText.text) } @Test fun checkH3HeadlinesWork() { - val markdownWithH3Headline = "some asdf\n\n### headline" + val markdownWithH3Headline = "### headline" val parsedText = parseMarkdown(markdownWithH3Headline) - assertEquals("some asdf\n\nheadline", parsedText.text) + assertEquals("headline", parsedText.text) } @Test fun checkH4HeadlinesWork() { - val markdownWithH4Headline = "some asdf\n\n#### headline" + val markdownWithH4Headline = "#### headline" val parsedText = parseMarkdown(markdownWithH4Headline) - assertEquals("some asdf\n\nheadline", parsedText.text) + assertEquals("headline", parsedText.text) } @Test fun checkH5HeadlinesWork() { - val markdownWithH5Headline = "some asdf\n\n##### headline" + val markdownWithH5Headline = "##### headline" val parsedText = parseMarkdown(markdownWithH5Headline) - assertEquals("some asdf\n\nheadline", parsedText.text) + assertEquals("headline", parsedText.text) } @OptIn(ExperimentalTextApi::class)