@Test public void testReset() throws Exception { assertEquals(0, history.getStandardDeviation(), 0.01); history.success(); history.failure(); assertThat(history.getStandardDeviation(), not(equalTo(0))); history.reset(); assertEquals(0, history.getStandardDeviation(), 0.01); assertEquals(0, history.getCount()); assertEquals(0, history.getTimeSinceLastMeasurement(), 0.01); assertEquals(1, history.getMean(), 0.01); assertEquals(0, history.getMin(), 0.01); assertEquals(0, history.getMax(), 0.01); history.success(); assertEquals(1, history.getMin(), 0.01); }
@Test public void testGetStandardDeviation() throws Exception { assertEquals(0, history.getStandardDeviation(), 0.01); history.success(); assertEquals(0, history.getStandardDeviation(), 1); }