Search code examples
javajunit4junit3

Porting JUnit tests from 3.x to 4.x


We have a lot of old unit tests which were written with Junit 3.x. I am tasked with porting them to our JUnit 4.x coding standard, which among things, forbids the use of "extends TestCase".

Some of the old tests have a call to super.setUp() which I need to now remove, however, I am not sure what is happening in that call. Can I just delete this line of code without worrying or should I replace it with something?


Solution

  • Since setUp() is now called before each test, you can safely remove super.setUp().