本文整理匯總了Java中junit.framework.TestSuite.countTestCases方法的典型用法代碼示例。如果您正苦於以下問題:Java TestSuite.countTestCases方法的具體用法?Java TestSuite.countTestCases怎麽用?Java TestSuite.countTestCases使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類junit.framework.TestSuite
的用法示例。
在下文中一共展示了TestSuite.countTestCases方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createTestSuite
import junit.framework.TestSuite; //導入方法依賴的package包/類
/**
* Creates a runnable JUnit test suite based on the criteria already given.
*/
/*
* Class parameters must be raw. This annotation should go on testerClass in
* the for loop, but the 1.5 javac crashes on annotations in for loops:
* <http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6294589>
*/
@SuppressWarnings("unchecked")
public TestSuite createTestSuite() {
checkCanCreate();
logger.fine(" Testing: " + name);
logger.fine("Features: " + formatFeatureSet(features));
FeatureUtil.addImpliedFeatures(features);
logger.fine("Expanded: " + formatFeatureSet(features));
// Class parameters must be raw.
List<Class<? extends AbstractTester>> testers = getTesters();
TestSuite suite = new TestSuite(name);
for (Class<? extends AbstractTester> testerClass : testers) {
final TestSuite testerSuite =
makeSuiteForTesterClass((Class<? extends AbstractTester<?>>) testerClass);
if (testerSuite.countTestCases() > 0) {
suite.addTest(testerSuite);
}
}
return suite;
}