fix InheritanceToDelegationTest

This commit is contained in:
Dmitry Jemerov
2009-09-11 12:48:33 +04:00
parent 5df9f57409
commit 15ab2c55b2

View File

@@ -126,9 +126,9 @@ public class InheritanceToDelegationTest extends MultiFileTestCase {
final boolean delegateOtherMembers, final boolean generateGetter) {
return new PerformAction() {
public void performAction(VirtualFile rootDir, VirtualFile rootAfter) throws Exception {
PsiClass aClass = myJavaFacade.findClass(className, GlobalSearchScope.projectScope(getProject()));
PsiClass aClass = myJavaFacade.findClass(className, GlobalSearchScope.allScope(getProject()));
assertNotNull("Class " + className + " not found", aClass);
PsiClass baseClass = myJavaFacade.findClass(baseClassName, GlobalSearchScope.projectScope(getProject()));
PsiClass baseClass = myJavaFacade.findClass(baseClassName, GlobalSearchScope.allScope(getProject()));
assertNotNull("Base class " + baseClassName + " not found", baseClass);
final PsiMethod[] methods = baseClass.getMethods();
final PsiMethod[] delegatedMethods = new PsiMethod[methodIndices.length];
@@ -138,7 +138,7 @@ public class InheritanceToDelegationTest extends MultiFileTestCase {
final PsiClass[] delegatedInterfaces = new PsiClass[delegatedInterfaceNames.length];
for (int i = 0; i < delegatedInterfaceNames.length; i++) {
String delegatedInterfaceName = delegatedInterfaceNames[i];
PsiClass anInterface = myJavaFacade.findClass(delegatedInterfaceName, GlobalSearchScope.projectScope(getProject()));
PsiClass anInterface = myJavaFacade.findClass(delegatedInterfaceName, GlobalSearchScope.allScope(getProject()));
assertNotNull(anInterface);
delegatedInterfaces[i] = anInterface;
}
@@ -156,9 +156,9 @@ public class InheritanceToDelegationTest extends MultiFileTestCase {
final boolean delegateOtherMembers, final boolean generateGetter) {
return new PerformAction() {
public void performAction(VirtualFile rootDir, VirtualFile rootAfter) throws Exception {
PsiClass aClass = myJavaFacade.findClass(className, GlobalSearchScope.projectScope(getProject()));
PsiClass aClass = myJavaFacade.findClass(className, GlobalSearchScope.allScope(getProject()));
assertNotNull("Class " + className + " not found", aClass);
PsiClass baseClass = myJavaFacade.findClass(baseClassName, GlobalSearchScope.projectScope(getProject()));
PsiClass baseClass = myJavaFacade.findClass(baseClassName, GlobalSearchScope.allScope(getProject()));
assertNotNull("Base class " + baseClassName + " not found", baseClass);
final PsiMethod[] delegatedMethods;
final List<PsiMethod> methodsList = new ArrayList<PsiMethod>();
@@ -171,7 +171,7 @@ public class InheritanceToDelegationTest extends MultiFileTestCase {
final PsiClass[] delegatedInterfaces = new PsiClass[delegatedInterfaceNames.length];
for (int i = 0; i < delegatedInterfaceNames.length; i++) {
String delegatedInterfaceName = delegatedInterfaceNames[i];
PsiClass anInterface = myJavaFacade.findClass(delegatedInterfaceName, GlobalSearchScope.projectScope(getProject()));
PsiClass anInterface = myJavaFacade.findClass(delegatedInterfaceName, GlobalSearchScope.allScope(getProject()));
assertNotNull(anInterface);
delegatedInterfaces[i] = anInterface;
}