mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 08:45:34 +07:00
a test for method lookup element presentation
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
class Foo {
|
||||
{
|
||||
"".equals<caret>
|
||||
}
|
||||
}
|
||||
+13
@@ -14,6 +14,7 @@ import com.intellij.psi.PsiFile
|
||||
import com.intellij.psi.PsiMethod
|
||||
import com.intellij.psi.codeStyle.CodeStyleSettings
|
||||
import com.intellij.psi.codeStyle.CodeStyleSettingsManager
|
||||
import com.intellij.codeInsight.lookup.LookupElementPresentation
|
||||
|
||||
public class NormalCompletionTest extends LightFixtureCompletionTestCase {
|
||||
@Override
|
||||
@@ -116,6 +117,18 @@ public class NormalCompletionTest extends LightFixtureCompletionTestCase {
|
||||
|
||||
public void testSimpleVariable() throws Exception { doTest() }
|
||||
|
||||
public void testMethodItemPresentation() {
|
||||
configure()
|
||||
def presentation = new LookupElementPresentation()
|
||||
myItems[0].renderElement(presentation)
|
||||
assert "equals" == presentation.itemText
|
||||
assert "(Object anObject)" == presentation.tailText
|
||||
assert "boolean" == presentation.typeText
|
||||
|
||||
assert !presentation.tailGrayed
|
||||
assert presentation.itemTextBold
|
||||
}
|
||||
|
||||
public void testPreferLongerNamesOption() throws Exception {
|
||||
configureByFile("PreferLongerNamesOption.java");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user