introduce array from varargs expression: preserve the method call (IDEA-75519)

This commit is contained in:
anna
2011-10-14 15:42:04 +02:00
parent c272f2781e
commit 5cf4f5c155
4 changed files with 25 additions and 3 deletions

View File

@@ -3,8 +3,6 @@ package com.intellij.refactoring;
import com.intellij.JavaTestUtil;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.projectRoots.Sdk;
import com.intellij.openapi.projectRoots.impl.JavaSdkImpl;
import com.intellij.psi.*;
import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.refactoring.ui.TypeSelectorManagerImpl;
@@ -85,6 +83,12 @@ public class IntroduceConstantTest extends LightCodeInsightTestCase {
checkResultByFile(BASE_PATH + getTestName(false) + "_after.java");
}
public void testArrayFromVarargs() throws Exception {
configureByFile(BASE_PATH + getTestName(false) + ".java");
new MockIntroduceConstantHandler(null).invoke(getProject(), getEditor(), getFile(), null);
checkResultByFile(BASE_PATH + getTestName(false) + "_after.java");
}
public void testEscalateVisibility() throws Exception {
configureByFile(BASE_PATH + getTestName(false) + ".java");