Filterable (JUnit API)

Junit


org.junit.runner.manipulation Interface Filterable

All Known Implementing Classes:
AllTests, BlockJUnit4ClassRunner, org.junit.internal.runners.JUnit38ClassRunner, JUnit4, Parameterized, ParentRunner, Suite, org.junit.internal.runners.SuiteMethod

public interface Filterable

Runners that allow filtering should implement this interface. Implement filter(Filter) to remove tests that don't pass the filter.


方法摘要
 void filter(Filter filter)
          Remove tests that don't pass the parameter filter.
 

方法详细信息

filter

void filter(Filter filter)
            throws NoTestsRemainException
Remove tests that don't pass the parameter filter.

参数:
filter - the Filter to apply
抛出异常:
NoTestsRemainException - if all tests are filtered out