Is a new (or different) instance of TestCase
object is used to run each test method in a JUnit test case? Or one instance is reused for all the tests?
public class MyTest extends TestCase {
public void testSomething() { ... }
public void testSomethingElse() { ... }
}
While running this test, how many instances of MyTest
class is created?
If possible, provide a link to a document or source code where I can verify the behaviour.