add missing class to mockJDK rt.jar so that test will pass with JDK 1.5
authorDmitry Jemerov <yole@intellij.com>
Fri, 11 Sep 2009 14:05:55 +0000 (18:05 +0400)
committerDmitry Jemerov <yole@intellij.com>
Fri, 11 Sep 2009 14:05:55 +0000 (18:05 +0400)
java/java-tests/testSrc/com/intellij/refactoring/RenameClassTest.java
java/mockJDK/jre/lib/rt.jar

index fb1ba50ddebc9650fcdae5885f42143b8b2922ec..9986a13a66862c60b42235a6dda8f8df1d30bc24 100644 (file)
@@ -2,8 +2,11 @@ package com.intellij.refactoring;
 
 import com.intellij.openapi.fileEditor.FileDocumentManager;
 import com.intellij.openapi.vfs.VirtualFile;
+import com.intellij.openapi.projectRoots.Sdk;
+import com.intellij.openapi.projectRoots.impl.JavaSdkImpl;
 import com.intellij.psi.PsiClass;
 import com.intellij.psi.PsiDocumentManager;
+import com.intellij.psi.search.GlobalSearchScope;
 import com.intellij.refactoring.rename.RenameProcessor;
 import com.intellij.JavaTestUtil;
 import org.jetbrains.annotations.NonNls;
@@ -55,7 +58,7 @@ public class RenameClassTest extends MultiFileTestCase {
   }
 
   private void performAction(String qClassName, String newName) throws Exception {
-    PsiClass aClass = myJavaFacade.findClass(qClassName);
+    PsiClass aClass = myJavaFacade.findClass(qClassName, GlobalSearchScope.allScope(getProject()));
     assertNotNull("Class " + qClassName + " not found", aClass);
 
     new RenameProcessor(myProject, aClass, newName, true, true).run();
@@ -66,4 +69,9 @@ public class RenameClassTest extends MultiFileTestCase {
   protected String getTestRoot() {
     return "/refactoring/renameClass/";
   }
+
+  @Override
+  protected Sdk getTestProjectJdk() {
+    return JavaSdkImpl.getMockJdk15("java 1.5");
+  }
 }
index 5a3ef89366fede8a0a66f4b6e83ef625afd92dfb..aaafbb350c3720756e2ac341aa42384cd0959860 100644 (file)
Binary files a/java/mockJDK/jre/lib/rt.jar and b/java/mockJDK/jre/lib/rt.jar differ