Patched test to avoid package renaming.

This commit is contained in:
Alexander.Podkhalyuzin
2012-02-22 13:57:33 +04:00
parent 7c00984930
commit c9c81ed70f
5 changed files with 18 additions and 15 deletions
@@ -1,18 +1,18 @@
package testing.second package testing.rename2
import testing.first.Third import testing.rename.Third
import testing.* import testing.*
import java.util.ArrayList import java.util.ArrayList
// Extends testing.first.Third // Extends testing.rename.Third
public class Second : Third() { public class Second : Third() {
val temp : testing.first.Third = Third() val temp : testing.rename.Third = Third()
fun tempName(param : Third) : first.Third { fun tempName(param : Third) : rename.Third {
val local = Third() val local = Third()
val otherLocal = param val otherLocal = param
val arr = ArrayList<Third>() val arr = ArrayList<Third>()
return testing.first.Third() return testing.rename.Third()
} }
} }
@@ -1,4 +1,4 @@
package testing.first package testing.rename
public open class Third { public open class Third {
} }
@@ -1,4 +1,4 @@
package testing.first package testing.rename
public open class First { public open class First {
} }
@@ -1,18 +1,18 @@
package testing.second package testing.rename2
import testing.first.First import testing.rename.First
import testing.* import testing.*
import java.util.ArrayList import java.util.ArrayList
// Extends testing.first.First // Extends testing.rename.First
public class Second : First() { public class Second : First() {
val temp : testing.first.First = First() val temp : testing.rename.First = First()
fun tempName(param : First) : first.First { fun tempName(param : First) : rename.First {
val local = First() val local = First()
val otherLocal = param val otherLocal = param
val arr = ArrayList<First>() val arr = ArrayList<First>()
return testing.first.First() return testing.rename.First()
} }
} }
@@ -19,6 +19,8 @@ package org.jetbrains.jet.plugin.refactoring.rename;
import com.intellij.openapi.fileEditor.FileDocumentManager; import com.intellij.openapi.fileEditor.FileDocumentManager;
import com.intellij.openapi.vfs.LocalFileSystem; import com.intellij.openapi.vfs.LocalFileSystem;
import com.intellij.openapi.vfs.VirtualFile; import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.vfs.VirtualFileManager;
import com.intellij.openapi.vfs.VirtualFileSystem;
import com.intellij.psi.PsiDocumentManager; import com.intellij.psi.PsiDocumentManager;
import com.intellij.psi.PsiElement; import com.intellij.psi.PsiElement;
import com.intellij.psi.search.GlobalSearchScope; import com.intellij.psi.search.GlobalSearchScope;
@@ -47,7 +49,7 @@ public class RenameInKotlinTest extends MultiFileTestCase {
} }
public void testRenameKotlinClass() throws Exception { public void testRenameKotlinClass() throws Exception {
doTestWithRenameClass("testing.first.First", "Third"); doTestWithRenameClass("testing.rename.First", "Third");
} }
private void doTestWithRenameClass(@NonNls final String qClassName, @NonNls final String newName) throws Exception { private void doTestWithRenameClass(@NonNls final String qClassName, @NonNls final String newName) throws Exception {
@@ -66,6 +68,7 @@ public class RenameInKotlinTest extends MultiFileTestCase {
new RenameProcessor(myProject, psiElement, newName, true, true).run(); new RenameProcessor(myProject, psiElement, newName, true, true).run();
PsiDocumentManager.getInstance(myProject).commitAllDocuments(); PsiDocumentManager.getInstance(myProject).commitAllDocuments();
FileDocumentManager.getInstance().saveAllDocuments(); FileDocumentManager.getInstance().saveAllDocuments();
VirtualFileManager.getInstance().refresh(false);
} }
}); });
} }