Class InvalidJUnitTest

    • Field Detail

      • state

        private int state
      • directChildOfTestCase

        boolean directChildOfTestCase
      • sawSuperCall

        private boolean sawSuperCall
    • Constructor Detail

      • InvalidJUnitTest

        public InvalidJUnitTest​(BugReporter bugReporter)
    • Method Detail

      • isJunit3TestCase

        private boolean isJunit3TestCase​(XClass jClass)
                                  throws java.lang.ClassNotFoundException
        Throws:
        java.lang.ClassNotFoundException
      • hasTestMethods

        private boolean hasTestMethods​(org.apache.bcel.classfile.JavaClass jClass)
      • hasSuite

        private boolean hasSuite​(org.apache.bcel.classfile.Method[] methods)
        is there a JUnit3TestSuite
      • enabled

        private boolean enabled()
        Check whether or not this detector should be enabled. The detector is disabled if the TestCase class cannot be found (meaning we don't have junit.jar on the aux classpath).
        Returns:
        true if it should be enabled, false if not
      • visit

        public void visit​(org.apache.bcel.classfile.Method obj)
        Overrides:
        visit in class BetterVisitor
      • visit

        public void visit​(org.apache.bcel.classfile.Code obj)
        Overrides:
        visit in class DismantleBytecode