mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 18:28:55 +07:00
IDEA-31831 Intention aciton: Move initializer to setUp(). Implemented
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
// "Move initializer to setUp method" "true"
|
||||
package junit.framework;
|
||||
|
||||
public class X extends TestCase {
|
||||
int i;
|
||||
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
i = 7;
|
||||
}
|
||||
}
|
||||
|
||||
//HACK: making test possible without attaching jUnit
|
||||
public abstract class TestCase {
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// "Move initializer to setUp method" "true"
|
||||
public class X {
|
||||
<caret>int i;
|
||||
|
||||
@org.testng.annotations.BeforeMethod
|
||||
public void setUp() throws Exception {
|
||||
i = 7;
|
||||
}
|
||||
|
||||
@org.testng.annotations.Test
|
||||
public void test() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// "Move initializer to setUp method" "true"
|
||||
public class X {
|
||||
<caret>int i;
|
||||
|
||||
@org.junit.Before
|
||||
public void setUp() throws Exception {
|
||||
i = 7;
|
||||
}
|
||||
|
||||
@org.junit.Test
|
||||
public void test() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Move initializer to setUp method" "true"
|
||||
package junit.framework;
|
||||
|
||||
public class X extends TestCase {
|
||||
<caret>int i = 7;
|
||||
}
|
||||
|
||||
//HACK: making test possible without attaching jUnit
|
||||
public abstract class TestCase {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Move initializer to setUp method" "false"
|
||||
public class X {
|
||||
<caret>int i = 7;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Move initializer to setUp method" "true"
|
||||
public class X {
|
||||
<caret>int i = 7;
|
||||
|
||||
@org.testng.annotations.Test
|
||||
public void test() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Move initializer to setUp method" "true"
|
||||
public class X {
|
||||
<caret>int i = 7;
|
||||
|
||||
@org.junit.Test
|
||||
public void test() {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user