/** * {@inheritDoc} * * @since 4.13 */ public void order(Orderer orderer) throws InvalidOrderingException { orderer.apply(fRunner); } }
public void filter(Filter filter) throws NoTestsRemainException { filter.apply(fRunner); }
/** * Invoke with a {@link org.junit.runner.Runner} to cause all tests it intends to run * to first be checked with the filter. Only those that pass the filter will be run. * * @param child the runner to be filtered by the receiver * @throws NoTestsRemainException if the receiver removes all tests */ public void apply(Object child) throws NoTestsRemainException { if (!(child instanceof Filterable)) { return; } Filterable filterable = (Filterable) child; filterable.filter(this); }
public void sort(Sorter sorter) { sorter.apply(fRunner); }
/** * Sorts the test in <code>runner</code> using <code>comparator</code> */ public void apply(Object object) { if (object instanceof Sortable) { Sortable sortable = (Sortable) object; sortable.sort(this); } }
/** * Order the tests in <code>target</code> using this ordering. * * @throws InvalidOrderingException if ordering does something invalid (like remove or add * children) */ public void apply(Object target) throws InvalidOrderingException { /* * Note that some subclasses of Ordering override apply(). The Sorter * subclass of Ordering overrides apply() to apply the sort (this is * done because sorting is more efficient than ordering). */ if (target instanceof Orderable) { Orderable orderable = (Orderable) target; orderable.order(new Orderer(this)); } }
/** * Order the tests in <code>target</code>. * * @throws InvalidOrderingException if ordering does something invalid (like remove or add * children) */ public void apply(Object target) throws InvalidOrderingException { if (target instanceof Orderable) { Orderable orderable = (Orderable) target; orderable.order(this); } } }
public void filter(Filter filter) throws NoTestsRemainException { filter.apply(fRunner); }
/** * Invoke with a {@link org.junit.runner.Runner} to cause all tests it intends to run * to first be checked with the filter. Only those that pass the filter will be run. * * @param child the runner to be filtered by the receiver * @throws NoTestsRemainException if the receiver removes all tests */ public void apply(Object child) throws NoTestsRemainException { if (!(child instanceof Filterable)) { return; } Filterable filterable = (Filterable) child; filterable.filter(this); }
public void sort(Sorter sorter) { sorter.apply(fRunner); } }
/** * Sorts the tests in <code>target</code> using <code>comparator</code>. * * @since 4.0 */ @Override public void apply(Object target) { /* * Note that all runners that are Orderable are also Sortable (because * Orderable extends Sortable). Sorting is more efficient than ordering, * so we override the parent behavior so we sort instead. */ if (target instanceof Sortable) { Sortable sortable = (Sortable) target; sortable.sort(this); } }
/** * {@inheritDoc} * * @since 4.13 */ public void order(Orderer orderer) throws InvalidOrderingException { if (getTest() instanceof Orderable) { Orderable adapter = (Orderable) getTest(); adapter.order(orderer); } }
@Override public String describe() { return filter.describe(); } }
private void sortChild(T child) { fSorter.apply(child); }
public void sort(Sorter sorter) { if (getTest() instanceof Sortable) { Sortable adapter = (Sortable) getTest(); adapter.sort(sorter); } }