java - Modifying the TestCase.class present inside junit.framwork gives "The hierarchy of the type 'classname' is inconsistent" error in the subclass -
i have added new variable in testcase.class file present inside junit.framework package inside junit.jar(4.11). after adding variable , replacing old testcase.class file modified one, getting error "the hierarchy of type 'classname' inconsistent" in class declaration extending testcase class. below code.
public class junit_test extends testcase { @beforeclass public static void init(){ system.out.println("executing beforeclass annotation"); } } the testcase.class modification:
public abstract class testcase extends assert implements test { /** * name of test case */ private string fname; private string fdesc; //added variable
this kind of error happen when jre jar file not in build path. add jar file build path , try run again.
Comments
Post a Comment