Пример #1
0
        public void CalArithmeticMean_DoubleInputValues_Success()
        {
            IStatsService statsService = new StatsService();
            double        mean         = statsService.CalcArithmeticMean(new double[] { 1.5, 1.5, 1.5 });

            Assert.Equal(1.5, mean);
        }
Пример #2
0
        public void CalArithmeticMean_CornerCase_ZeroValue()
        {
            IStatsService statsService = new StatsService();

            Assert.Equal(0, statsService.CalcArithmeticMean(new double[] { 0 }));
        }
Пример #3
0
        public void CalArithmeticMean_EmptyList_Exception()
        {
            IStatsService statsService = new StatsService();

            Assert.Throws <ArgumentException>(() => statsService.CalcArithmeticMean(new double[] { }));
        }