本文整理汇总了C#中org.shouldRun方法的典型用法代码示例。如果您正苦于以下问题:C# org.shouldRun方法的具体用法?C# org.shouldRun怎么用?C# org.shouldRun使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org
的用法示例。
在下文中一共展示了org.shouldRun方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: filter
public virtual void filter(org.junit.runner.manipulation.Filter filter)
{
if (this.getTest() is Filterable)
{
((Filterable) this.getTest()).filter(filter);
}
else
{
if (!(this.getTest() is TestSuite))
return;
TestSuite testSuite1 = (TestSuite) this.getTest();
TestSuite testSuite2 = new TestSuite(testSuite1.getName());
int num = testSuite1.testCount();
for (int index = 0; index < num; ++index)
{
Test test = testSuite1.testAt(index);
if (filter.shouldRun(JUnit38ClassRunner.makeDescription(test)))
testSuite2.addTest(test);
}
this.setTest((Test) testSuite2);
}
}
示例2: filter
public virtual void filter(org.junit.runner.manipulation.Filter filter)
{
Iterator iterator = this.fTestMethods.iterator();
while (iterator.hasNext())
{
Method method = (Method) iterator.next();
if (!filter.shouldRun(this.methodDescription(method)))
iterator.remove();
}
if (!this.fTestMethods.isEmpty())
return;
Throwable.__\u003CsuppressFillInStackTrace\u003E();
throw new NoTestsRemainException();
}