/**
* Checks that all fields are distinguished.
*/
public void testEquals() {
BarRenderer r1 = new BarRenderer();
BarRenderer r2 = new BarRenderer();
assertEquals(r1, r2);
// the plot field is NOT tested
// toolTipGenerator
r1.setToolTipGenerator(new StandardCategoryToolTipGenerator());
assertFalse(r1.equals(r2));
r2.setToolTipGenerator(new StandardCategoryToolTipGenerator());
assertTrue(r1.equals(r2));
// toolTipGeneratorList
r1.setSeriesToolTipGenerator(1, new StandardCategoryToolTipGenerator());
assertFalse(r1.equals(r2));
r2.setSeriesToolTipGenerator(1, new StandardCategoryToolTipGenerator());
assertTrue(r1.equals(r2));
// baseToolTipGenerator
r1.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator("{2}",
NumberFormat.getInstance()));
assertFalse(r1.equals(r2));
r2.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator("{2}",
NumberFormat.getInstance()));
assertTrue(r1.equals(r2));
// itemLabelGenerator
r1.setItemLabelGenerator(new StandardCategoryItemLabelGenerator());
assertFalse(r1.equals(r2));
r2.setItemLabelGenerator(new StandardCategoryItemLabelGenerator());
assertTrue(r1.equals(r2));
// itemLabelGeneratorList
r1.setSeriesItemLabelGenerator(1,
new StandardCategoryItemLabelGenerator());
assertFalse(r1.equals(r2));
r2.setSeriesItemLabelGenerator(1,
new StandardCategoryItemLabelGenerator());
assertTrue(r1.equals(r2));
// baseItemLabelGenerator
r1.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator(
"{2}", NumberFormat.getInstance()));
assertFalse(r1.equals(r2));
r2.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator(
"{2}", NumberFormat.getInstance()));
assertTrue(r1.equals(r2));
// urlGenerator
r1.setItemURLGenerator(new StandardCategoryURLGenerator());
assertFalse(r1.equals(r2));
r2.setItemURLGenerator(new StandardCategoryURLGenerator());
assertTrue(r1.equals(r2));
// urlGeneratorList
r1.setSeriesItemURLGenerator(1, new StandardCategoryURLGenerator());
assertFalse(r1.equals(r2));
r2.setSeriesItemURLGenerator(1, new StandardCategoryURLGenerator());
assertTrue(r1.equals(r2));
// baseItemURLGenerator
r1.setBaseItemURLGenerator(new StandardCategoryURLGenerator(
"abc.html"));
assertFalse(r1.equals(r2));
r2.setBaseItemURLGenerator(new StandardCategoryURLGenerator(
"abc.html"));
assertTrue(r1.equals(r2));
// legendItemLabelGenerator
r1.setLegendItemLabelGenerator(new StandardCategorySeriesLabelGenerator(
"XYZ"));
assertFalse(r1.equals(r2));
r2.setLegendItemLabelGenerator(new StandardCategorySeriesLabelGenerator(
"XYZ"));
assertTrue(r1.equals(r2));
// legendItemToolTipGenerator
r1.setLegendItemToolTipGenerator(
new StandardCategorySeriesLabelGenerator("ToolTip"));
assertFalse(r1.equals(r2));
r2.setLegendItemToolTipGenerator(
new StandardCategorySeriesLabelGenerator("ToolTip"));
assertTrue(r1.equals(r2));
// legendItemURLGenerator
r1.setLegendItemURLGenerator(
new StandardCategorySeriesLabelGenerator("URL"));
assertFalse(r1.equals(r2));
r2.setLegendItemURLGenerator(
new StandardCategorySeriesLabelGenerator("URL"));
assertTrue(r1.equals(r2));
}