本文整理汇总了Java中junit.framework.TestSuite.testCount方法的典型用法代码示例。如果您正苦于以下问题:Java TestSuite.testCount方法的具体用法?Java TestSuite.testCount怎么用?Java TestSuite.testCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类junit.framework.TestSuite
的用法示例。
在下文中一共展示了TestSuite.testCount方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: wrap
import junit.framework.TestSuite; //导入方法依赖的package包/类
public static TestSuite wrap(TestSuite t) {
TestSuite result = new TestSuite();
for (int cntr = 0; cntr < t.testCount(); cntr++) {
result.addTest(wrap(t.testAt(cntr)));
}
return result;
}
示例2: getChildren
import junit.framework.TestSuite; //导入方法依赖的package包/类
@Override public ObservableList<TreeItem<Test>> getChildren() {
ObservableList<TreeItem<Test>> children = super.getChildren();
if (!children.isEmpty()) {
if (testRunner.showFailures()) {
List<TreeItem<Test>> failures = children.stream().filter(new Predicate<TreeItem<Test>>() {
@Override public boolean test(TreeItem<Test> t) {
return ((TestTreeItem) t).getState() == State.ERROR || ((TestTreeItem) t).getState() == State.FAILURE;
}
}).collect(Collectors.toList());
children.setAll(failures);
} else {
if (children.containsAll(allChildren)) {
return children;
}
children.setAll(allChildren);
}
} else {
if (test instanceof TestSuite) {
TestSuite suite = (TestSuite) test;
int countTestCases = suite.testCount();
for (int i = 0; i < countTestCases; i++) {
children.add(new TestTreeItem(suite.testAt(i), testRunner));
}
allChildren.setAll(children);
}
}
return children;
}