/**
* Some checks for the equals() method.
*/
public void testEquals() {
TaskSeries s1 = new TaskSeries("Series");
s1.add(new Task("Task 1", new Date(0L), new Date(1L)));
s1.add(new Task("Task 2", new Date(10L), new Date(11L)));
s1.add(new Task("Task 3", new Date(20L), new Date(21L)));
TaskSeriesCollection u1 = new TaskSeriesCollection();
u1.add(s1);
SlidingGanttCategoryDataset d1 = new SlidingGanttCategoryDataset(
u1, 0, 5);
TaskSeries s2 = new TaskSeries("Series");
s2.add(new Task("Task 1", new Date(0L), new Date(1L)));
s2.add(new Task("Task 2", new Date(10L), new Date(11L)));
s2.add(new Task("Task 3", new Date(20L), new Date(21L)));
TaskSeriesCollection u2 = new TaskSeriesCollection();
u2.add(s2);
SlidingGanttCategoryDataset d2 = new SlidingGanttCategoryDataset(
u2, 0, 5);
assertTrue(d1.equals(d2));
d1.setFirstCategoryIndex(1);
assertFalse(d1.equals(d2));
d2.setFirstCategoryIndex(1);
assertTrue(d1.equals(d2));
d1.setMaximumCategoryCount(99);
assertFalse(d1.equals(d2));
d2.setMaximumCategoryCount(99);
assertTrue(d1.equals(d2));
s1.add(new Task("Task 2", new Date(10L), new Date(11L)));
assertFalse(d1.equals(d2));
s2.add(new Task("Task 2", new Date(10L), new Date(11L)));
assertTrue(d1.equals(d2));
}