* Tests the auto-pruning feature.
*/
public void testAutoPrune() {
// WITH AUTOPRUNING
DefaultTableXYDataset dataset = new DefaultTableXYDataset(true);
dataset.addSeries(createSeriesA());
assertEquals(2, dataset.getItemCount()); // should be 2 items
dataset.addSeries(createSeriesB());
assertEquals(2, dataset.getItemCount()); // still 2
dataset.removeSeries(1);
assertEquals(1, dataset.getItemCount()); // 1 value pruned.
// WITHOUT AUTOPRUNING
DefaultTableXYDataset dataset2 = new DefaultTableXYDataset(true);
dataset2.addSeries(createSeriesA());
assertEquals(2, dataset2.getItemCount()); // should be 2 items
dataset2.addSeries(createSeriesB());
assertEquals(2, dataset2.getItemCount()); // still 2
dataset2.removeSeries(1);
assertEquals(1, dataset2.getItemCount()); // still 2.
}