org.nutz.lang.born.BorningException: Fail to born or cast to 'org.nutz.integration.activiti.ActivitiIocLoader'
by args: [@(nutzRunner)]
because: No suitable Constructor or Factory Method!!
at org.nutz.lang.Mirror.born(Mirror.java:1008)
at org.nutz.ioc.loader.combo.ComboIocLoader.createIocLoader(ComboIocLoader.java:120)
at org.nutz.ioc.loader.combo.ComboIocLoader.<init>(ComboIocLoader.java:94)
at org.nutz.mock.NutTestRunner.createIocLoader(NutTestRunner.java:59)
at org.nutz.mock.NutTestRunner.createIoc(NutTestRunner.java:67)
at org.nutz.mock.NutTestRunner.runChild(NutTestRunner.java:30)
at org.nutz.mock.NutTestRunner.runChild(NutTestRunner.java:14)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
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)
package org.activiti.designer.test;
import nutzRunner.MyNutTestRunner;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.nutz.ioc.Ioc;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
@RunWith(MyNutTestRunner.class)
@IocBean
public class MyJunitTest extends Assert {
@Inject("refer:$ioc")
protected Ioc ioc;
@Test
public void myTest() {
System.out.println("ceshi helloword");
}
}
package nutzRunner;
import com.iqingmai.MainModule;
import org.junit.runners.model.InitializationError;
import org.nutz.mock.NutTestRunner;
public class MyNutTestRunner extends NutTestRunner {
public MyNutTestRunner(Class<?> klass) throws InitializationError {
super(klass);
}
@Override
protected Class<?> getMainModule() {
return MainModule.class;
}
}