/**
* Some checks for the findRangeBounds() method.
*/
public void testFindRangeBounds() {
StatisticalLineAndShapeRenderer r
= new StatisticalLineAndShapeRenderer();
assertNull(r.findRangeBounds(null));
// an empty dataset should return a null range
DefaultStatisticalCategoryDataset dataset
= new DefaultStatisticalCategoryDataset();
assertNull(r.findRangeBounds(dataset));
dataset.add(1.0, 0.5, "R1", "C1");
assertEquals(new Range(0.5, 1.5), r.findRangeBounds(dataset));
dataset.add(-2.0, 0.2, "R1", "C2");
assertEquals(new Range(-2.2, 1.5), r.findRangeBounds(dataset));
dataset.add(null, null, "R1", "C3");
assertEquals(new Range(-2.2, 1.5), r.findRangeBounds(dataset));
dataset.add(5.0, 1.0, "R2", "C3");
assertEquals(new Range(-2.2, 6.0), r.findRangeBounds(dataset));
// check that the series visible flag is observed
r.setSeriesVisible(1, Boolean.FALSE);
assertEquals(new Range(-2.2, 1.5), r.findRangeBounds(dataset));
}