Spring Constructor Injection falling test
This commit is contained in:
committed by
Nikolay Krasko
parent
6ae247ba61
commit
ce77751349
@@ -0,0 +1,3 @@
|
||||
import org.springframework.beans.factory.annotation.Autowired
|
||||
|
||||
class Bean(<caret>val prop: String)
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
{
|
||||
springConfig: ["config.xml"],
|
||||
file: "Bean.kt",
|
||||
icon: "SpringBeanMethod",
|
||||
tooltip: "Navigate to the spring bean ",
|
||||
naming: "bean",
|
||||
targets: ["bean"]
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
default-init-method="myDefaultInitMethod"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<bean id="bean" class="Bean">
|
||||
<constructor-arg index="0" value="string1"/>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
+2
-1
@@ -22,6 +22,7 @@ import com.google.gson.JsonParser
|
||||
import com.intellij.openapi.util.io.FileUtil
|
||||
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase
|
||||
import icons.SpringApiIcons
|
||||
import junit.framework.Assert
|
||||
import org.jetbrains.kotlin.idea.jsonUtils.getString
|
||||
import org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
import org.jetbrains.kotlin.idea.test.ConfigLibraryUtil
|
||||
@@ -72,7 +73,7 @@ abstract class AbstractSpringClassAnnotatorTest : KotlinLightCodeInsightFixtureT
|
||||
}
|
||||
|
||||
val tooltip = config.getString("tooltip")
|
||||
assert(gutterMark.tooltipText == tooltip)
|
||||
Assert.assertEquals(tooltip, gutterMark.tooltipText)
|
||||
|
||||
val naming = config.getString("naming")
|
||||
val targets = (config["targets"] as JsonArray).map { it.asString }
|
||||
|
||||
+7
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -42,6 +42,12 @@ public class SpringClassAnnotatorTestGenerated extends AbstractSpringClassAnnota
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("autowiredConstructor/autowiredConstructor.test")
|
||||
public void testAutowiredConstructor_AutowiredConstructor() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/gutter/autowiredConstructor/autowiredConstructor.test");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("autowiredProperty/autowiredProperty.test")
|
||||
public void testAutowiredProperty_AutowiredProperty() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("ultimate/testData/spring/core/gutter/autowiredProperty/autowiredProperty.test");
|
||||
|
||||
Reference in New Issue
Block a user