Exemplo n.º 1
0
        public void Test_AverageByMedian()
        {
            double expected = 8.0;

            double actual = CalculateAverage.Calculate(values, new Median());

            Assert.AreEqual(expected, actual, 0.000001);

            actual = CalculateAverageDelegate.Calculate(values, new Median().CalculateAverage);

            Assert.AreEqual(expected, actual, 0.000001);
        }
Exemplo n.º 2
0
        public void Test_AverageByMean()
        {
            double expected = 8.3636363;

            double actual = CalculateAverage.Calculate(values);

            Assert.AreEqual(expected, actual, 0.000001);

            actual = CalculateAverageDelegate.Calculate(values);

            Assert.AreEqual(expected, actual, 0.000001);
        }