下面代码中的 isIgnored 找不到
@Override
protected void runChild(FrameworkMethod method, RunNotifier notifier) {
if (isIgnored(method)) {
super.runChild(method, notifier);
return;
}
Ioc ioc = createIoc();
try {
iocHolder.set(ioc);
super.runChild(method, notifier);
} finally {
iocHolder.remove();
ioc.depose();
}
}
运行单元测试时报错如下
java.lang.NoSuchMethodError: org.nutz.mock.NutTestRunner.isIgnored(Lorg/junit/runners/model/FrameworkMethod;)Z
at org.nutz.mock.NutTestRunner.runChild(NutTestRunner.java:26)
at org.nutz.mock.NutTestRunner.runChild(NutTestRunner.java:14)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)