コード例 #1
0
        public void CalcStandardDeviation()
        {
            IStatsService statsService      = new StatsService();
            double        standardDeviation = statsService.CalcStandardDeviation(new double[] { 3, 7, 7, 19 });

            Assert.Equal(6, standardDeviation);
        }
コード例 #2
0
        public void CalcStandardDeviation_CornerCaseOneItem()
        {
            IStatsService statsService = new StatsService();

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