@Test public void aSpecIs_anNonStaticItField() throws Exception { subject = ContextFactory.createRootContext(ContextClasses.StaticIt.class); assertThat(subject.numSpecs(), equalTo(0L)); }
@Override public long numSpecs() { long declaredInSelf = getSpecs().count(); long declaredInDescendants = getSubContexts() .map(Context::numSpecs) .collect(Collectors.summingLong(x -> x)); return declaredInSelf + declaredInDescendants; }
ClassContext extends Context { @Override public long numSpecs() { long declaredInSelf = getSpecs().count(); long declaredInDescendants = getSubContexts() .map(Context::numSpecs) .collect(Collectors.summingLong(x -> x)); return declaredInSelf + declaredInDescendants; } }
ClassContext extends Context { @Override public long numSpecs() { long declaredInSelf = getSpecs().count(); long declaredInDescendants = getSubContexts() .map(Context::numSpecs) .collect(Collectors.summingLong(x -> x)); return declaredInSelf + declaredInDescendants; } protected  ClassContext(String id, Description suiteDescription); }
ClassContext extends Context { @Override public long numSpecs() { long declaredInSelf = getSpecs().count(); long declaredInDescendants = getSubContexts() .map(Context::numSpecs) .collect(Collectors.summingLong(x -> x)); return declaredInSelf + declaredInDescendants; } protected  ClassContext(String id, Description suiteDescription); @Override void addSpec(Spec spec); void addSubContext(Context context); @Override Description getDescription(); @Override boolean hasSpecs(); @Override long numSpecs(); @Override void run(RunNotifier notifier); }
ClassContext extends Context { @Override public long numSpecs() { long declaredInSelf = getSpecs().count(); long declaredInDescendants = getSubContexts() .map(Context::numSpecs) .collect(Collectors.summingLong(x -> x)); return declaredInSelf + declaredInDescendants; } protected  ClassContext(String id, Description suiteDescription); @Override void addSpec(Spec spec); void addSubContext(Context context); @Override Description getDescription(); @Override boolean hasSpecs(); @Override long numSpecs(); @Override void run(RunNotifier notifier);  }