Inspectopedia Help

JUnit 3 test can be JUnit 4

Reports JUnit 3 test classes that can be converted to JUnit 4 test classes.


public class MainTestCase extends junit.framework.TestCase { public void test() { Assert.assertTrue(true); } }

After the quick-fix is applied:

public class MainTestCase { @org.junit.Test public void test() { Assert.assertTrue(true); } }

This inspection only reports if the language level of the project or module is 5 or higher, and JUnit 4 is available on the classpath.

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3


Java, 233.SNAPSHOT

Last modified: 13 July 2023