Skip to content

Commit

Permalink
Split test cases up
Browse files Browse the repository at this point in the history
  • Loading branch information
janseeger committed Jul 16, 2024
1 parent e26f2bc commit b0a146d
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions dachlatten-markdown/src/test/kotlin/MarkdownConverterTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -95,48 +95,57 @@ class MarkdownConverterTest {
}

@Test
fun checkH1HeadlinesWork() {
fun checkHeadlineWithParagraphWorks() {
val markdownWithH1Headline = "some asdf\n\n# headline"

val parsedText = parseMarkdown(markdownWithH1Headline)

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)
Expand Down

0 comments on commit b0a146d

Please sign in to comment.