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
0
 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();
 }