mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[junit] IDEA-343301 IJ-CR-177906 split test cases
GitOrigin-RevId: 16eb2095c8a90b42abc9fc5824a67761e1924675
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c5e17bc12e
commit
52d99a3dfc
+30
-18
@@ -1416,27 +1416,39 @@ abstract class KotlinJUnitMalformedDeclarationInspectionTest : KotlinJUnitMalfor
|
||||
fun beforeAll(foo: String) { println(foo) }
|
||||
}
|
||||
}
|
||||
|
||||
@org.junit.jupiter.api.extension.ExtendWith(MyTest.MyCallback::class)
|
||||
@CustomTestAnnotation
|
||||
annotation class MyTest {
|
||||
class MyCallback : org.junit.jupiter.api.extension.AfterEachCallback {
|
||||
override fun afterEach(context: org.junit.jupiter.api.extension.ExtensionContext) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@MyTest
|
||||
class MultipleMetaParameterResolver {
|
||||
companion object {
|
||||
@JvmStatic
|
||||
@org.junit.jupiter.api.BeforeAll
|
||||
fun beforeAll(foo: String) { println(foo) }
|
||||
}
|
||||
}
|
||||
""".trimIndent())
|
||||
}
|
||||
|
||||
fun `test nested meta-annotations`() {
|
||||
myFixture.testHighlighting(
|
||||
JvmLanguage.KOTLIN, """
|
||||
class MyBefore : org.junit.jupiter.api.extension.BeforeEachCallback {
|
||||
override fun beforeEach(context: org.junit.jupiter.api.extension.ExtensionContext) {
|
||||
}
|
||||
}
|
||||
|
||||
@org.junit.jupiter.api.extension.ExtendWith(MyBefore::class)
|
||||
annotation class CustomTestAnnotation
|
||||
|
||||
@org.junit.jupiter.api.extension.ExtendWith(MyTest.MyCallback::class)
|
||||
@CustomTestAnnotation
|
||||
annotation class MyTest {
|
||||
class MyCallback : org.junit.jupiter.api.extension.AfterEachCallback {
|
||||
override fun afterEach(context: org.junit.jupiter.api.extension.ExtensionContext) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@MyTest
|
||||
class MultipleMetaParameterResolver {
|
||||
companion object {
|
||||
@org.junit.jupiter.api.Test
|
||||
fun test() { }
|
||||
}
|
||||
}
|
||||
""".trimIndent())
|
||||
}
|
||||
|
||||
fun `test non-malformed parameter resolver with value source`() {
|
||||
myFixture.testHighlighting(
|
||||
JvmLanguage.KOTLIN, """
|
||||
|
||||
Reference in New Issue
Block a user