Test for renaming not base java method with base kotlin method
This commit is contained in:
+1
@@ -0,0 +1 @@
|
|||||||
|
// RENAME: JAVA_METHOD->testing.JavaClient.D->void first()->second
|
||||||
@@ -142,7 +142,10 @@ public abstract class AbstractRenameTest extends MultiFileTestCase {
|
|||||||
PsiMethod methodBySignature = aClass.findMethodBySignature(manager.getElementFactory().createMethodFromText(methodSignature + "{}", null), false);
|
PsiMethod methodBySignature = aClass.findMethodBySignature(manager.getElementFactory().createMethodFromText(methodSignature + "{}", null), false);
|
||||||
assertNotNull("Method with signature '" + methodSignature + "' wasn't found in class " + className, methodBySignature);
|
assertNotNull("Method with signature '" + methodSignature + "' wasn't found in class " + className, methodBySignature);
|
||||||
|
|
||||||
new RenameProcessor(myProject, methodBySignature, newName, false, false).run();
|
PsiElement substitution = RenamePsiElementProcessor.forElement(methodBySignature).substituteElementToRename(methodBySignature, null);
|
||||||
|
assert substitution != null;
|
||||||
|
|
||||||
|
new RenameProcessor(myProject, substitution, newName, false, false).run();
|
||||||
|
|
||||||
PsiDocumentManager.getInstance(myProject).commitAllDocuments();
|
PsiDocumentManager.getInstance(myProject).commitAllDocuments();
|
||||||
FileDocumentManager.getInstance().saveAllDocuments();
|
FileDocumentManager.getInstance().saveAllDocuments();
|
||||||
|
|||||||
@@ -53,6 +53,11 @@ public class RenameTestGenerated extends AbstractRenameTest {
|
|||||||
doTest("idea/testData/refactoring/rename/renameKotlinBaseMethod/javaWrapperForBaseFunction.test");
|
doTest("idea/testData/refactoring/rename/renameKotlinBaseMethod/javaWrapperForBaseFunction.test");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("renameKotlinBaseMethod/javaWrapperForOverridenFunctionWithKotlinBase.test")
|
||||||
|
public void testRenameKotlinBaseMethod_JavaWrapperForOverridenFunctionWithKotlinBase() throws Exception {
|
||||||
|
doTest("idea/testData/refactoring/rename/renameKotlinBaseMethod/javaWrapperForOverridenFunctionWithKotlinBase.test");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("renameKotlinBaseMethod/kotlinBaseFunction.test")
|
@TestMetadata("renameKotlinBaseMethod/kotlinBaseFunction.test")
|
||||||
public void testRenameKotlinBaseMethod_KotlinBaseFunction() throws Exception {
|
public void testRenameKotlinBaseMethod_KotlinBaseFunction() throws Exception {
|
||||||
doTest("idea/testData/refactoring/rename/renameKotlinBaseMethod/kotlinBaseFunction.test");
|
doTest("idea/testData/refactoring/rename/renameKotlinBaseMethod/kotlinBaseFunction.test");
|
||||||
|
|||||||
Reference in New Issue
Block a user