initialize in setup: add field initialization instead of variable declaration (IDEA-62451)

This commit is contained in:
anna
2010-12-07 18:16:39 +03:00
parent 19ccd895cb
commit cb7ccebc23
4 changed files with 40 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
import junit.framework.TestCase;
public class T extends TestCase {
private String i;
public void setUp() throws Exception {
i = getName();
myName = " second " + i;
}
public void test() throws Exception {
}
private String getName() {
return null;
}
}

View File

@@ -0,0 +1,14 @@
import junit.framework.TestCase;
public class T extends TestCase {
public void setUp() throws Exception {
String na<caret>me = getName();
myName = " second " + name;
}
public void test() throws Exception {
}
private String getName() {
return null;
}
}