For the good part of the tests that I run for my application, I have a common set of settings and tearDown.
When I create a new JUnit Test Case class, I have the opportunity for eclipse to automatically create the setUp () and tearDown () methods.
Is there a way to change the default setUp and TearDown methods for some custom lines of code?
So, when I create a new test class with the setUp method checked, I get:
@Before
public void setUp() throws Exception
{
UnitTestSetup.standardSetup();
}
Importing should not be a problem, as it automatically imports the required package upon saving.
source
share