Skip to content
Snippets Groups Projects
Commit 1805ddbd authored by Hwaipy Li's avatar Hwaipy Li
Browse files

add an UnitTest for Histogram

To avoid the tempMax problem
parent b6b59e90
No related branches found
No related tags found
No related merge requests found
......@@ -40,5 +40,13 @@ public class HistogramTest {
// chart.addSeries("histogram 1", histogram.getxAxisData(), histogram.getyAxisData());
// new SwingWrapper(chart).displayChart();
}@Test
public void testNegetiveValues() {
Histogram histogram = new Histogram(Arrays.asList(-1, -2, -3, -4, -5, -6),3);
assertThat(histogram.getMax()).isEqualTo(-1);
assertThat(histogram.getMin()).isEqualTo(-6);
assertThat(histogram.getNumBins()).isEqualTo(3);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment