Test for renaming not base java method with base kotlin method

This commit is contained in:
Nikolay Krasko
2013-11-25 21:37:30 +04:00
parent b178c79573
commit 3aaf90f8aa
3 changed files with 10 additions and 1 deletions
@@ -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);
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();
FileDocumentManager.getInstance().saveAllDocuments();
@@ -53,6 +53,11 @@ public class RenameTestGenerated extends AbstractRenameTest {
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")
public void testRenameKotlinBaseMethod_KotlinBaseFunction() throws Exception {
doTest("idea/testData/refactoring/rename/renameKotlinBaseMethod/kotlinBaseFunction.test");