微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

org.junit.internal.builders.JUnit4Builder的实例源码

项目: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());
}
项目:Reer    文件AllExceptIgnoredTestRunnerBuilder.java   
@Override
protected JUnit4Builder junit4Builder() {
    return new FallbackJUnit4Builder();
}
项目:sweet-junit-runner    文件SuiteRunnerTest.java   
@Test(expected = InitializationError.class)
public void shouldFailIfConfigurationIsMissing() throws Exception {
    new SuiteRunner(IgnorednotAnnotatedTest.class,new JUnit4Builder());
}
项目:Pushjet-Android    文件AllExceptIgnoredTestRunnerBuilder.java   
protected JUnit4Builder junit4Builder() {
    return new FallbackJUnit4Builder();
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。