项目:effektif
文件:TestSuiteHelper.java
public static void run(Configuration configuration,Class<?> clazz,String methodName) {
try {
Request request = null;
if (clazz!=null && methodName!=null) {
request = Request.method(clazz,methodName);
} else {
Suite suite = new Suite(new JUnit4Builder(),API_TEST_CLASSES);
request = Request.runner(suite);
}
Configuration originalConfiguration = WorkflowTest.cachedConfiguration;
WorkflowTest.cachedConfiguration = configuration;
JUnitCore junitCore = new JUnitCore();
Result result = junitCore.run(request);
WorkflowTest.cachedConfiguration = originalConfiguration;
checkResult(result);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
项目:sweet-junit-runner
文件:SuiteRunnerTest.java
@Test
public void shouldProcesstestFiles() throws Exception {
// when
SuiteRunner suiteRunner = new SuiteRunner(IntegrationTestSuite.class,new JUnit4Builder());
// then
assertEquals(IntegrationTestSuite.class.getName(),suiteRunner.getTestClass().getName());
}
@Override
protected JUnit4Builder junit4Builder() {
return new FallbackJUnit4Builder();
}
项目:sweet-junit-runner
文件:SuiteRunnerTest.java
protected JUnit4Builder junit4Builder() {
return new FallbackJUnit4Builder();
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。