Example (JUnit 4 annotation in JUnit 3 test case):
public class MyTest extends TestCase {
@Test
public void foo() { }
@Test
@Ignore
public void testBar() { }
}
After the quick-fix is applied:
public class MyTest extends TestCase {
public void testFoo() {}
public void _testBar() {}
}
Example (JUnit 5 annotation in JUnit 4 test case):
public class MyTest {
@BeforeAll // JUnit 5 lifecycle method
public void initialize() { }
@org.junit.Test // JUnit 4 test annotation
public void test() {}
@org.junit.Test // JUnit 4 test annotation
public void testWouldBeExecuted() {}
}
After the quick-fix is applied:
public class MyTest {
@BeforeClass // JUnit 4 lifecycle method
public void initialize() { }
@org.junit.Test // JUnit 4 test annotation
public void test() {}
@org.junit.Test // JUnit 4 test annotation
public void testWouldBeExecuted() {}
}