public void ClearTest() { double[] values = { 0.5, -1.2, 0.7, 0.2, 1.1 }; RunningNormalStatistics target = new RunningNormalStatistics(); for (int i = 0; i < values.Length; i++) target.Push(values[i]); target.Clear(); double[] values2 = { 1.5, -5.2, 0.7, 1.2, 9.1 }; for (int i = 0; i < values.Length; i++) target.Push(values2[i]); Assert.AreEqual(values2.Mean(), target.Mean, 1e-10); Assert.AreEqual(values2.StandardDeviation(), target.StandardDeviation, 1e-10); Assert.AreEqual(values2.Variance(), target.Variance, 1e-10); }