当我尝试运行 Junit 测试用例时,我遇到了异常。如果我正在更改类路径条目顺序,它工作正常,但 Jococo 覆盖不起作用。它正在挂起。任何人都可以帮助解决这个问题。
<classpathentry kind="lib" path="libt/junit-4.8.2.jar"/>
<classpathentry kind="lib" path="lib/jmockit.jar"/>
java.lang.IllegalStateException: JMockit wasn't properly initialized; check that jmockit.jar precedes junit.jar in the classpath (if using JUnit; if not, check the documentation)
at com.amica.bc.testutil.BillingCenterTestUtil$1.<init>(BillingCenterTestUtil.java:18)
at com.amica.bc.testutil.BillingCenterTestUtil.setCurrentUserName(BillingCenterTestUtil.java:18)
at amica.util.logging.TestAmicaGWLogger.setUp(TestAmicaGWLogger.java:36)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)