public void CalcHistogram_CornerCaseEmptyList() { IStatsService statsService = new StatsService(); Dictionary <int, int> histogram = statsService.GetHistogram(new double[] { }); Assert.Empty(histogram); }
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]); }