mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
test++
This commit is contained in:
+2
-1
@@ -1,6 +1,7 @@
|
||||
package com.intellij.psi;
|
||||
|
||||
import com.intellij.testFramework.PsiTestCase;
|
||||
import com.intellij.psi.search.GlobalSearchScope;
|
||||
|
||||
public class CodeFragmentsTest extends PsiTestCase{
|
||||
public CodeFragmentsTest() {
|
||||
@@ -9,7 +10,7 @@ public class CodeFragmentsTest extends PsiTestCase{
|
||||
|
||||
public void testAddImport() throws Exception {
|
||||
PsiCodeFragment fragment = myJavaFacade.getElementFactory().createExpressionCodeFragment("AAA.foo()", null, null, false);
|
||||
PsiClass arrayListClass = myJavaFacade.findClass("java.util.ArrayList");
|
||||
PsiClass arrayListClass = myJavaFacade.findClass("java.util.ArrayList", GlobalSearchScope.allScope(getProject()));
|
||||
PsiReference ref = fragment.findReferenceAt(0);
|
||||
ref.bindToElement(arrayListClass);
|
||||
assertEquals("ArrayList.foo()", fragment.getText());
|
||||
Reference in New Issue
Block a user