/**
* Test that the equals() method distinguishes all fields.
*/
public void testEquals() {
StandardPieSectionLabelGenerator g1
= new StandardPieSectionLabelGenerator();
StandardPieSectionLabelGenerator g2
= new StandardPieSectionLabelGenerator();
assertTrue(g1.equals(g2));
assertTrue(g2.equals(g1));
g1 = new StandardPieSectionLabelGenerator("{0}",
new DecimalFormat("#,##0.00"),
NumberFormat.getPercentInstance());
assertFalse(g1.equals(g2));
g2 = new StandardPieSectionLabelGenerator("{0}",
new DecimalFormat("#,##0.00"),
NumberFormat.getPercentInstance());
assertTrue(g1.equals(g2));
g1 = new StandardPieSectionLabelGenerator("{0} {1}",
new DecimalFormat("#,##0.00"),
NumberFormat.getPercentInstance());
assertFalse(g1.equals(g2));
g2 = new StandardPieSectionLabelGenerator("{0} {1}",
new DecimalFormat("#,##0.00"),
NumberFormat.getPercentInstance());
assertTrue(g1.equals(g2));
g1 = new StandardPieSectionLabelGenerator("{0} {1}",
new DecimalFormat("#,##0"), NumberFormat.getPercentInstance());
assertFalse(g1.equals(g2));
g2 = new StandardPieSectionLabelGenerator("{0} {1}",
new DecimalFormat("#,##0"), NumberFormat.getPercentInstance());
assertTrue(g1.equals(g2));
g1 = new StandardPieSectionLabelGenerator("{0} {1}",
new DecimalFormat("#,##0"), new DecimalFormat("0.000%"));
assertFalse(g1.equals(g2));
g2 = new StandardPieSectionLabelGenerator("{0} {1}",
new DecimalFormat("#,##0"), new DecimalFormat("0.000%"));
assertTrue(g1.equals(g2));
AttributedString as = new AttributedString("XYZ");
g1.setAttributedLabel(0, as);
assertFalse(g1.equals(g2));
g2.setAttributedLabel(0, as);
assertTrue(g1.equals(g2));
}