Skip to content

Commit

Permalink
test(commonmark): add test to verify issue 282
Browse files Browse the repository at this point in the history
issue #282
  • Loading branch information
Build Pipeline committed Dec 27, 2022
1 parent 10013a4 commit 26b2025
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package org.bsc.makdown.commonmark

import org.bsc.confluence.model.Site
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
import java.nio.file.Paths

class Issue282Test {

var site = Site().apply {
basedir = Paths.get(System.getProperty("user.dir"))
}

@Test
fun parse() {
val content = parseResource( this.javaClass, "issue282", this.site )

assertEquals("""
test coverage of at least 70%. (Measures to show this for each PR will need to be investigated)
""".trimIndent(), content )
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import org.apache.commons.io.IOUtils
import org.bsc.confluence.model.Site
import org.bsc.markdown.MarkdownParserContext
import org.bsc.markdown.commonmark.CommonmarkConfluenceWikiVisitor
import org.junit.jupiter.api.Assertions.fail
import org.junit.jupiter.api.fail
import java.nio.charset.Charset
import java.util.*

Expand Down Expand Up @@ -34,7 +36,7 @@ fun parseResource(type: Class<*>, name: String, site: Site): String? =
parseContent(site, IOUtils.toString(it, Charset.defaultCharset()))
}
} catch (e: Exception) {
//Assertions.fail()
fail( e )
null;
}

2 changes: 2 additions & 0 deletions processor-commonmark/src/test/resources/issue282.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

test coverage of at least 70%%. (Measures to show this for each PR will need to be investigated)

0 comments on commit 26b2025

Please sign in to comment.