@Test public void meanOfLargerSequence() { Statistician s = new Statistician(); s.nextNumber(2.0); s.nextNumber(2.0); s.nextNumber(2.0); assertEquals(2.0, s.getMean(), 0.0001); }
@Test public void meanOfSmallSequence() { Statistician s = new Statistician(); s.nextNumber(1.1); assertEquals(1.1, s.getMean(), 0.0001); }
@Test public void meanOfAnEmptySequence() { Statistician s = new Statistician(); assertEquals(Double.NaN, s.getMean(), 0.0001); }