Ejemplo n.º 1
0
        public void CalcHistogram_CornerCaseEmptyList()
        {
            IStatsService         statsService = new StatsService();
            Dictionary <int, int> histogram    = statsService.GetHistogram(new double[] { });

            Assert.Empty(histogram);
        }
Ejemplo n.º 2
0
        public void CalcHistogram()
        {
            IStatsService         statsService = new StatsService();
            Dictionary <int, int> histogram    = statsService.GetHistogram(new double[] { 3, 70, 110, 6, 110, 110.5 });

            Assert.Equal(3, histogram.Count);
            Assert.Equal(2, histogram[0]);
            Assert.Equal(3, histogram[11]);
        }