-
-
Save IgnatBeresnev/434e0e123e813d7c7209b144139e5925 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.jetbrains.dokka.javadoc | |
import org.jetbrains.dokka.base.testApi.testRunner.BaseAbstractTest | |
import org.jsoup.Jsoup | |
import org.junit.jupiter.api.Test | |
import signatures.firstSignature | |
import signatures.renderedContent | |
import utils.* | |
internal class JavadocNamingTest : AbstractJavadocTemplateMapTest() { | |
val configuration = dokkaConfiguration { | |
suppressObviousFunctions = false | |
sourceSets { | |
sourceSet { | |
sourceRoots = listOf("src/main/kotlin") | |
} | |
} | |
} | |
@Test | |
fun asd() { | |
val writerPlugin = TestOutputWriterPlugin() | |
testInline( | |
""" | |
|/src/main/kotlin/sample/TestCase.kt | |
|package sample | |
| | |
|data class TestCase( | |
| var standardString: String, | |
| var standardBoolean: Boolean, | |
| var issuesFetched: Int, | |
| var issuesWereDisplayed: Boolean, | |
| | |
| var isFoo: String, | |
| var isBar: Boolean, | |
| var is_underscoreA: String, | |
| var is_underscoreB: Boolean, | |
| var is1of: String, | |
| var is2of: Boolean, | |
| | |
| var i: Boolean, | |
| var `is`: Boolean, | |
| var isz: Boolean, | |
| var isA: Int, | |
| var isB: Boolean, | |
|) | |
""".trimIndent(), | |
configuration, | |
cleanupOutput = false, | |
pluginOverrides = listOf(writerPlugin, JavadocPlugin()) | |
) { | |
renderingStage = { _, _ -> | |
writerPlugin.writer.contents["sample/TestCase.html"] | |
.let { Jsoup.parse(it) } | |
// probably some other part of the resulting html can be used | |
.select("#memberSummary_tabpanel") | |
.select("th[scope=row].colSecond") | |
.first() | |
.match(Code(A("getStandardString"), "()")) | |
} | |
} | |
} | |
private class Code(vararg matchers: Any) : Tag("code", *matchers) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment