1b3823db9f1192d8c81345740b3e65bd6738ba55bBrett Chabotpackage org.junit.runner.manipulation;
2b3823db9f1192d8c81345740b3e65bd6738ba55bBrett Chabot
3b3823db9f1192d8c81345740b3e65bd6738ba55bBrett Chabot/**
4b3823db9f1192d8c81345740b3e65bd6738ba55bBrett Chabot * Runners that allow filtering should implement this interface. Implement {@link #filter(Filter)}
5b3823db9f1192d8c81345740b3e65bd6738ba55bBrett Chabot * to remove tests that don't pass the filter.
6aeb93fc33cae3aadbb9b46083350ad2dc9aea645Paul Duffin *
7aeb93fc33cae3aadbb9b46083350ad2dc9aea645Paul Duffin * @since 4.0
8b3823db9f1192d8c81345740b3e65bd6738ba55bBrett Chabot */
9b3823db9f1192d8c81345740b3e65bd6738ba55bBrett Chabotpublic interface Filterable {
10b3823db9f1192d8c81345740b3e65bd6738ba55bBrett Chabot
11aeb93fc33cae3aadbb9b46083350ad2dc9aea645Paul Duffin    /**
12aeb93fc33cae3aadbb9b46083350ad2dc9aea645Paul Duffin     * Remove tests that don't pass the parameter <code>filter</code>.
13aeb93fc33cae3aadbb9b46083350ad2dc9aea645Paul Duffin     *
14aeb93fc33cae3aadbb9b46083350ad2dc9aea645Paul Duffin     * @param filter the {@link Filter} to apply
15aeb93fc33cae3aadbb9b46083350ad2dc9aea645Paul Duffin     * @throws NoTestsRemainException if all tests are filtered out
16aeb93fc33cae3aadbb9b46083350ad2dc9aea645Paul Duffin     */
17aeb93fc33cae3aadbb9b46083350ad2dc9aea645Paul Duffin    void filter(Filter filter) throws NoTestsRemainException;
18b3823db9f1192d8c81345740b3e65bd6738ba55bBrett Chabot
19b3823db9f1192d8c81345740b3e65bd6738ba55bBrett Chabot}
20