extract light method object: get rid of physical copy and write action; add executed lines before 'breakpoint'; skip fields in generated out variables

This commit is contained in:
Anna Kozlova
2014-09-08 20:29:29 +04:00
parent cbb22b8c9f
commit 1181b95bde
3 changed files with 27 additions and 46 deletions
@@ -53,9 +53,7 @@ public class ExtractMethodObject4DebuggerTest extends LightRefactoringTestCase {
}
public void testSimpleGeneration() throws Exception {
doTest("int i = 0; int j = 0;", "Test test = new Test().invoke();\n" +
" int i = test.getI();\n" +
" int j = test.getJ();",
doTest("int i = 0; int j = 0;", "Test test = new Test().invoke();int i = test.getI();int j = test.getJ();",
"public class Test {\n" +
" private int i;\n" +
@@ -78,9 +76,7 @@ public class ExtractMethodObject4DebuggerTest extends LightRefactoringTestCase {
}
public void testInvokeReturnType() throws Exception {
doTest("x = 6; y = 6;", "Test test = new Test().invoke();\n" +
" x = test.getX();\n" +
" y = test.getY();",
doTest("x = 6; y = 6;", "Test test = new Test().invoke();x = test.getX();y = test.getY();",
"public static class Test {\n" +
" private int x;\n" +