From 17f3fea789abe3d6fb03eec361ebac5d78a2f9fd Mon Sep 17 00:00:00 2001 From: Andrzej Ratajczak Date: Wed, 26 Aug 2020 12:09:05 +0200 Subject: Add tests to ensure variance --- plugins/base/src/test/kotlin/signatures/SignatureUtils.kt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 plugins/base/src/test/kotlin/signatures/SignatureUtils.kt (limited to 'plugins/base/src/test/kotlin/signatures/SignatureUtils.kt') diff --git a/plugins/base/src/test/kotlin/signatures/SignatureUtils.kt b/plugins/base/src/test/kotlin/signatures/SignatureUtils.kt new file mode 100644 index 00000000..e77b8757 --- /dev/null +++ b/plugins/base/src/test/kotlin/signatures/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 -- cgit