diff options
author | Andrzej Ratajczak <andrzej.ratajczak98@gmail.com> | 2020-07-02 17:32:21 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-07-08 11:48:29 +0200 |
commit | 8150d8478018ab36ae2bab0447bbd3322a895e36 (patch) | |
tree | 5d8eb1a5c99e3f6a0530c823d5b0453b855efde0 /plugins/base/src/test/kotlin/renderers | |
parent | f80d5938ccafcf5bd41d73f98bebe2d9699faa95 (diff) | |
download | dokka-8150d8478018ab36ae2bab0447bbd3322a895e36.tar.gz dokka-8150d8478018ab36ae2bab0447bbd3322a895e36.tar.bz2 dokka-8150d8478018ab36ae2bab0447bbd3322a895e36.zip |
Add GFM tests
Diffstat (limited to 'plugins/base/src/test/kotlin/renderers')
-rw-r--r-- | plugins/base/src/test/kotlin/renderers/RenderingOnlyTestBase.kt | 3 | ||||
-rw-r--r-- | plugins/base/src/test/kotlin/renderers/html/HtmlRenderingOnlyTestBase.kt | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/plugins/base/src/test/kotlin/renderers/RenderingOnlyTestBase.kt b/plugins/base/src/test/kotlin/renderers/RenderingOnlyTestBase.kt index 8e58bbcd..b5523d50 100644 --- a/plugins/base/src/test/kotlin/renderers/RenderingOnlyTestBase.kt +++ b/plugins/base/src/test/kotlin/renderers/RenderingOnlyTestBase.kt @@ -12,8 +12,9 @@ import org.jetbrains.dokka.testApi.context.MockContext import org.jetbrains.dokka.utilities.DokkaConsoleLogger import renderers.html.EmptyCommentConverter -abstract class RenderingOnlyTestBase { +abstract class RenderingOnlyTestBase<T> { abstract val context: MockContext + abstract val renderedContent: T } class TestPage(callback: PageContentBuilder.DocumentableContentBuilder.() -> Unit) : RootPageNode(), ContentPage { diff --git a/plugins/base/src/test/kotlin/renderers/html/HtmlRenderingOnlyTestBase.kt b/plugins/base/src/test/kotlin/renderers/html/HtmlRenderingOnlyTestBase.kt index 69025947..4f51a97d 100644 --- a/plugins/base/src/test/kotlin/renderers/html/HtmlRenderingOnlyTestBase.kt +++ b/plugins/base/src/test/kotlin/renderers/html/HtmlRenderingOnlyTestBase.kt @@ -19,7 +19,7 @@ import org.jsoup.nodes.TextNode import renderers.RenderingOnlyTestBase import utils.TestOutputWriter -abstract class HtmlRenderingOnlyTestBase : RenderingOnlyTestBase() { +abstract class HtmlRenderingOnlyTestBase : RenderingOnlyTestBase<Element>() { val files = TestOutputWriter() override val context = MockContext( @@ -33,7 +33,7 @@ abstract class HtmlRenderingOnlyTestBase : RenderingOnlyTestBase() { ) ) - protected val renderedContent: Element by lazy { + override val renderedContent: Element by lazy { files.contents.getValue("test-page.html").let { Jsoup.parse(it) }.select("#content").single() } |