testdata for light extract method

This commit is contained in:
Anna Kozlova
2014-10-18 09:34:44 +02:00
parent 785a31011f
commit e74edb2614
2 changed files with 18 additions and 0 deletions
@@ -0,0 +1,5 @@
class Sample {
void foo() {
Runnable[] runs = {<caret>};
}
}
@@ -201,6 +201,19 @@ public class ExtractMethodObject4DebuggerTest extends LightRefactoringTestCase {
" }", false);
}
public void testNewArrayInitializer() throws Exception {
doTest("new Runnable[] {new Runnable() {public void run(){} } }",
"Runnable[] result = new Test().invoke();",
"public class Test {\n" +
" public Runnable[] invoke() {\n" +
" return new Runnable[]{new Runnable() {\n" +
" public void run() {\n" +
" }\n" +
" }};\n" +
" }\n" +
" }", false);
}
@Override
protected Sdk getProjectJDK() {
return IdeaTestUtil.getMockJdk18();