示例#1
0
        public void TestVarianceCalculatorBorneSuperieure()
        {
            const double varianceTest = 8.16;

            List <double> listNumber = new List <double>();

            listNumber.Add(10);
            listNumber.Add(20);
            listNumber.Add(30);

            double variance = VarianceCalculator.calculVariance(listNumber);

            Assert.Equal(variance, varianceTest);
        }
示例#2
0
        public void TestVarianceCalculatorBorneInferieure()
        {
            const double varianceTest = 173.47;

            List <double> listNumber = new List <double>();

            listNumber.Add(450.332342);
            listNumber.Add(25.4554);
            listNumber.Add(232.7777);

            double variance = VarianceCalculator.calculVariance(listNumber);

            Assert.Equal(variance, varianceTest);
        }
示例#3
0
        public void TestVarianceCalculatorBorneInvalide()
        {
            double variance = VarianceCalculator.calculVariance(null);

            Assert.Equal(double.NaN, variance);
        }