/** * Confirm that the equals method can distinguish all the required fields. */ public void testEquals() { DefaultWindDataset d1 = new DefaultWindDataset(); DefaultWindDataset d2 = new DefaultWindDataset(); assertTrue(d1.equals(d2)); assertTrue(d2.equals(d1)); d1 = createSampleDataset1(); assertFalse(d1.equals(d2)); d2 = createSampleDataset1(); assertTrue(d1.equals(d2)); }
/** * Some checks for the indexOf(Comparable) method. */ public void testIndexOf() { DefaultWindDataset d = createSampleDataset1(); assertEquals(0, d.indexOf("Series 1")); assertEquals(1, d.indexOf("Series 2")); assertEquals(-1, d.indexOf("Green Eggs and Ham")); assertEquals(-1, d.indexOf(null)); }
/** * Creates a sample dataset for testing. * * @return A sample dataset. */ public DefaultWindDataset createSampleDataset1() { Day t = new Day(1, 4, 2006); Object[] item1 = createItem(t, 3, 7); Object[] item2 = createItem(t.next(), 4, 8); Object[] item3 = createItem(t.next(), 5, 9); Object[][] series1 = new Object[][] {item1, item2, item3}; Object[] item1b = createItem(t, 6, 10); Object[] item2b = createItem(t.next(), 7, 11); Object[] item3b = createItem(t.next(), 8, 12); Object[][] series2 = new Object[][] {item1b, item2b, item3b}; Object[][][] data = new Object[][][] {series1, series2}; return new DefaultWindDataset(data); }
public void processNode(Object name, Map map, Object value) throws Exception { if(value != null && value instanceof DefaultWindDataset) { this.xyDataset = (DefaultWindDataset)value; }else { // TODO } }
/** * Verify that this class implements {@link PublicCloneable}. */ public void testPublicCloneable() { DefaultWindDataset d1 = new DefaultWindDataset(); assertTrue(d1 instanceof PublicCloneable); }
/** * Getter for property xyDataset. * @return Value of property xyDataset. */ public DefaultWindDataset getXyDataset() { return this.xyDataset; }
/** * Setter for property xyDataset. * @param xyDataset New value of property xyDataset. */ public void setXyDataset(DefaultWindDataset xyDataset) { this.xyDataset = xyDataset; }