AllOpen: Support @SpringBootTest annotation (KT-18262)

This commit is contained in:
Yan Zhulanow
2017-06-28 22:25:13 +03:00
parent 4dddb00aca
commit 53e193d130
5 changed files with 112 additions and 3 deletions
@@ -22,8 +22,11 @@ import org.jetbrains.kotlin.extensions.DeclarationAttributeAltererExtension
abstract class AbstractBytecodeListingTestForAllOpen : AbstractBytecodeListingTest() {
override fun setupEnvironment(environment: KotlinCoreEnvironment) {
val annotations = AbstractAllOpenDeclarationAttributeAltererExtension.ANNOTATIONS_FOR_TESTS +
AllOpenCommandLineProcessor.SUPPORTED_PRESETS.flatMap { it.value }
DeclarationAttributeAltererExtension.registerExtension(
environment.project, CliAllOpenDeclarationAttributeAltererExtension(
AbstractAllOpenDeclarationAttributeAltererExtension.ANNOTATIONS_FOR_TESTS))
environment.project,
CliAllOpenDeclarationAttributeAltererExtension(annotations))
}
}
@@ -102,6 +102,12 @@ public class BytecodeListingTestForAllOpenGenerated extends AbstractBytecodeList
doTest(fileName);
}
@TestMetadata("springAnnotations.kt")
public void testSpringAnnotations() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("plugins/allopen/allopen-cli/testData/bytecodeListing/springAnnotations.kt");
doTest(fileName);
}
@TestMetadata("superClassAnnotation.kt")
public void testSuperClassAnnotation() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("plugins/allopen/allopen-cli/testData/bytecodeListing/superClassAnnotation.kt");