add setup method before first test method: setting needed? (IDEA-61605)

This commit is contained in:
anna
2010-11-25 16:21:55 +03:00
parent 5ebb6cc3c2
commit cd5b299bf4
8 changed files with 49 additions and 18 deletions
@@ -2,12 +2,12 @@ import org.junit.*;
public class T {
private int i;
@Test
public void test() {
}
@Before
public void setUp() throws Exception {
i = 9;
}
@Test
public void test() {
}
}
@@ -3,12 +3,12 @@ import org.junit.Test;
public class T {
private int i;
@Test
public void test() {
}
@Before
public void setUp() throws Exception {
i = 9;
}
@Test
public void test() {
}
}
@@ -2,11 +2,11 @@ import junit.framework.TestCase;
public class T extends TestCase {
private int i;
public void test() {
}
protected void setUp() throws Exception {
super.setUp();
i = 9;
}
public void test() {
}
}
@@ -9,11 +9,11 @@ class Base extends TestCase {
public class T extends Base {
private int i;
public void test() {
}
public void setUp() throws Exception {
super.setUp();
i = 9;
}
public void test() {
}
}