List of usage examples for org.jfree.chart TestUtilities serialised
public static Object serialised(Object original)
From source file:org.jfree.data.general.DatasetGroupTest.java
/** * Serialize an instance, restore it, and check for equality. *//*from w w w . ja v a 2 s . c om*/ @Test public void testSerialization() { DatasetGroup g1 = new DatasetGroup(); DatasetGroup g2 = (DatasetGroup) TestUtilities.serialised(g1); assertEquals(g1, g2); }
From source file:org.jfree.data.time.FixedMillisecondTest.java
/** * Serialize an instance, restore it, and check for equality. *///from ww w .ja va 2 s. c om @Test public void testSerialization() { FixedMillisecond m1 = new FixedMillisecond(); FixedMillisecond m2 = (FixedMillisecond) TestUtilities.serialised(m1); assertEquals(m1, m2); }
From source file:org.jfree.data.time.TimePeriodAnchorTest.java
/** * Serialize an instance, restore it, and check for identity. *//*from w w w .ja va 2 s . c o m*/ @Test public void testSerialization() { TimePeriodAnchor a1 = TimePeriodAnchor.START; TimePeriodAnchor a2 = (TimePeriodAnchor) TestUtilities.serialised(a1); assertTrue(a1 == a2); }
From source file:org.jfree.data.time.TimePeriodValueTest.java
/** * Serialize an instance, restore it, and check for equality. *//*from w w w . j av a 2 s .c o m*/ @Test public void testSerialization() { TimePeriodValue tpv1 = new TimePeriodValue(new Day(30, 7, 2003), 55.75); TimePeriodValue tpv2 = (TimePeriodValue) TestUtilities.serialised(tpv1); assertEquals(tpv1, tpv2); }
From source file:org.jfree.data.xy.OHLCDataItemTest.java
/** * Serialize an instance, restore it, and check for equality. *///from www . j a va 2 s. co m @Test public void testSerialization() { OHLCDataItem i1 = new OHLCDataItem(new Date(1L), 1.0, 2.0, 3.0, 4.0, 5.0); OHLCDataItem i2 = (OHLCDataItem) TestUtilities.serialised(i1); assertEquals(i1, i2); }
From source file:org.jfree.data.general.DefaultKeyedValuesDatasetTest.java
/** * Serialize an instance, restore it, and check for equality. *//*w w w. ja v a 2 s. co m*/ public void testSerialization() { DefaultKeyedValuesDataset d1 = new DefaultKeyedValuesDataset(); d1.setValue("C1", new Double(234.2)); d1.setValue("C2", null); d1.setValue("C3", new Double(345.9)); d1.setValue("C4", new Double(452.7)); KeyedValuesDataset d2 = (KeyedValuesDataset) TestUtilities.serialised(d1); assertEquals(d1, d2); }
From source file:org.jfree.data.function.LineFunction2DTest.java
/** * Serialize an instance, restore it, and check for equality. *///from w w w. j a va2s. c om @Test public void testSerialization() { LineFunction2D f1 = new LineFunction2D(1.0, 2.0); LineFunction2D f2 = (LineFunction2D) TestUtilities.serialised(f1); assertEquals(f1, f2); }
From source file:org.jfree.data.xy.XYDataItemTest.java
/** * Serialize an instance, restore it, and check for equality. *//*from w w w. j av a 2s .co m*/ @Test public void testSerialization() { XYDataItem i1 = new XYDataItem(1.0, 1.1); XYDataItem i2 = (XYDataItem) TestUtilities.serialised(i1); assertEquals(i1, i2); }
From source file:org.jfree.data.statistics.HistogramBinTest.java
/** * Serialize an instance, restore it, and check for equality. *//*from ww w . j a va 2 s . co m*/ @Test public void testSerialization() { double start = 10.0; double end = 20.0; HistogramBin b1 = new HistogramBin(start, end); HistogramBin b2 = (HistogramBin) TestUtilities.serialised(b1); assertEquals(b1, b2); }
From source file:org.jfree.data.function.PowerFunction2DTest.java
/** * Serialize an instance, restore it, and check for equality. */// www . j a v a 2 s . c o m @Test public void testSerialization() { PowerFunction2D f1 = new PowerFunction2D(1.0, 2.0); PowerFunction2D f2 = (PowerFunction2D) TestUtilities.serialised(f1); assertEquals(f1, f2); }