Java 类org.junit.internal.runners.JUnit4ClassRunner 实例源码
项目:unitils
文件:UnitilsIntegrationTest.java
public static void main(String[] args) throws Exception {
Result result = new Result();
RunNotifier runNotifier = new RunNotifier();
runNotifier.addListener(result.createListener());
JUnit4ClassRunner classRunner = new JUnit4ClassRunner(UnitilsIntegrationTest.class);
classRunner.run(runNotifier);
if (result.getFailureCount() > 0) {
registerFailure();
}
}
项目:mlo-gui
文件:JavaFxJUnitRunner.java
public static Runner createRunnerFor(Class<?> clazz) throws InitializationError {
if (!shouldSkipClass() && isSubclassOfTestCase(clazz)) {
return new JUnit38ClassRunner(clazz);
}
return new JUnit4ClassRunner(clazz);
}
项目:astor
文件:JUnit44RunnerImpl.java
public JUnit44RunnerImpl(Class<?> klass) throws InitializationError {
this.runner = new JUnit4ClassRunner(klass) {
@Override
protected Object createTest() throws Exception {
Object test = super.createTest();
MockitoAnnotations.initMocks(test);
return test;
}
};
}
项目:astor
文件:JUnit44RunnerImpl.java
public JUnit44RunnerImpl(Class<?> klass) throws InitializationError {
this.runner = new JUnit4ClassRunner(klass) {
@Override
protected Object createTest() throws Exception {
Object test = super.createTest();
MockitoAnnotations.initMocks(test);
return test;
}
};
}