本文整理汇总了Java中org.junit.runner.Result.getIgnoreCount方法的典型用法代码示例。如果您正苦于以下问题:Java Result.getIgnoreCount方法的具体用法?Java Result.getIgnoreCount怎么用?Java Result.getIgnoreCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.junit.runner.Result
的用法示例。
在下文中一共展示了Result.getIgnoreCount方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: merge
import org.junit.runner.Result; //导入方法依赖的package包/类
/**
* Updates the current state of <code>this</code> with the <code>result</code>.
*
* @param testClass The test class executed.
* @param result The results of the test class execution.
* @return <code>this</code>
*/
public TestResults merge(Class<?> testClass, Result result) {
LOG.info("Tests run: {}, Failures: {}, Skipped: {}, Time elapsed: {} - in {}",
result.getRunCount(), result.getFailureCount(), result.getIgnoreCount(),
TimeUnit.SECONDS.convert(result.getRunTime(), TimeUnit.MILLISECONDS),
testClass.getName());
numRun += result.getRunCount();
numFailed += result.getFailureCount();
numIgnored += result.getIgnoreCount();
// Collect the failures
if (!result.wasSuccessful()) {
failures.addAll(result.getFailures());
}
return this;
}
示例2: printIgnoredTestCases
import org.junit.runner.Result; //导入方法依赖的package包/类
private void printIgnoredTestCases(final Result result) {
if (result.getIgnoreCount() == 1) {
printlnWarning("1 test case was ignored.");
} else if (result.getIgnoreCount() > 1) {
printlnWarning(result.getIgnoreCount() + " test cases were ignored.");
}
}
示例3: TestResult
import org.junit.runner.Result; //导入方法依赖的package包/类
public TestResult(Result result) {
runCount = result.getRunCount();
failureCount = result.getFailureCount();
ignoreCount = result.getIgnoreCount();
runTime = result.getRunTime();
if (!wasSuccessful()) {
throwable = result.getFailures().get(0).getException();
}
}