/** * Some checks for the testGenerateLabel() method. */ public void testGenerateLabel() { // check handling when the dataset is a regular XYDataset, not an // XYZDataset... XYSeries s1 = new XYSeries("S1"); s1.add(1.0, 2.0); s1.add(2.2, 3.3); XYSeriesCollection dataset = new XYSeriesCollection(s1); BubbleXYItemLabelGenerator g = new BubbleXYItemLabelGenerator(); assertEquals("{3}", g.generateLabel(dataset, 0, 0)); assertEquals("{3}", g.generateLabel(dataset, 0, 1)); }
/** * Simple check that hashCode is implemented. */ public void testHashCode() { BubbleXYItemLabelGenerator g1 = new BubbleXYItemLabelGenerator(); BubbleXYItemLabelGenerator g2 = new BubbleXYItemLabelGenerator(); assertTrue(g1.equals(g2)); assertTrue(g1.hashCode() == g2.hashCode()); }
/** * Check to ensure that this class implements PublicCloneable. */ public void testPublicCloneable() { BubbleXYItemLabelGenerator g1 = new BubbleXYItemLabelGenerator(); assertTrue(g1 instanceof PublicCloneable); }