Пример #1
0
  @Test
  public void sumOfSmallSequence() {
    Statistician s = new Statistician();
    s.nextNumber(1.1);

    assertEquals(1.1, s.getSum(), 0.0001);
  }
Пример #2
0
  @Test
  public void sumOfLargerSequence() {
    Statistician s = new Statistician();
    s.nextNumber(1.1);
    s.nextNumber(5.1);
    s.nextNumber(5.0);

    assertEquals(11.2, s.getSum(), 0.0001);
  }