aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/base-test-utils/src/main/kotlin/renderers/SignatureUtils.kt
diff options
context:
space:
mode:
authorAndrzej Ratajczak <andrzej.ratajczak98@gmail.com>2020-09-09 14:26:28 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-09-10 13:11:02 +0200
commit3792ef312ef347ef3300690e71c1cbf963a175e3 (patch)
tree8c9ece686ca772896602a8571ea54fcbd894d1bd /plugins/base/base-test-utils/src/main/kotlin/renderers/SignatureUtils.kt
parentd8a3e7db72109c8f439095a924bdc1da47b6ab6a (diff)
downloaddokka-3792ef312ef347ef3300690e71c1cbf963a175e3.tar.gz
dokka-3792ef312ef347ef3300690e71c1cbf963a175e3.tar.bz2
dokka-3792ef312ef347ef3300690e71c1cbf963a175e3.zip
Add tests
Diffstat (limited to 'plugins/base/base-test-utils/src/main/kotlin/renderers/SignatureUtils.kt')
-rw-r--r--plugins/base/base-test-utils/src/main/kotlin/renderers/SignatureUtils.kt12
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/base/base-test-utils/src/main/kotlin/renderers/SignatureUtils.kt b/plugins/base/base-test-utils/src/main/kotlin/renderers/SignatureUtils.kt
new file mode 100644
index 00000000..e77b8757
--- /dev/null
+++ b/plugins/base/base-test-utils/src/main/kotlin/renderers/SignatureUtils.kt
@@ -0,0 +1,12 @@
+package signatures
+
+import org.jsoup.Jsoup
+import org.jsoup.nodes.Element
+import utils.TestOutputWriter
+
+fun TestOutputWriter.renderedContent(path: String = "root/example.html") =
+ contents.getValue(path).let { Jsoup.parse(it) }.select("#content")
+ .single()
+
+fun Element.signature() = select("div.symbol.monospace")
+fun Element.firstSignature() = signature().first() \ No newline at end of file