I would like to reference a Class's name within a method. In the following example, I would like TestSuite to be printed out. I can put CarsTestSuite.class.getName()
, but I'd like to use the method to get the class name so that I never have to edit it. The solution will find the method's class instead of myself filling it in.
public class TestSuite extends TestCase {
public static void testOne() {
System.out.println(<want TestSuite to be here>);