Is there any way to get class of current test case executing. By @Rule annotation we can get method name of current test method but to get class I am not able to find the way by which I can get class.
public void setUp() throws Exception
{
Method method=MyClass.class.getMethod(testName.getMethodName());
}
I want to get Myclass so that I can achieve generalization in above code for any class containing test method.
Thanks in Advance.