1 46 47 package org.jfree.chart.renderer.xy.junit; 48 49 import junit.framework.Test; 50 import junit.framework.TestCase; 51 import junit.framework.TestSuite; 52 53 import org.jfree.data.xy.DefaultTableXYDataset; 54 import org.jfree.data.xy.TableXYDataset; 55 import org.jfree.data.xy.XYSeries; 56 import org.jfree.data.xy.XYSeriesCollection; 57 58 63 public class RendererXYPackageTests extends TestCase { 64 65 70 public static Test suite() { 71 TestSuite suite = new TestSuite("org.jfree.chart.renderer.xy"); 72 suite.addTestSuite(AbstractXYItemRendererTests.class); 73 suite.addTestSuite(CandlestickRendererTests.class); 74 suite.addTestSuite(ClusteredXYBarRendererTests.class); 75 suite.addTestSuite(HighLowRendererTests.class); 76 suite.addTestSuite(StackedXYAreaRendererTests.class); 77 suite.addTestSuite(StackedXYAreaRenderer2Tests.class); 78 suite.addTestSuite(StackedXYBarRendererTests.class); 79 suite.addTestSuite(StandardXYItemRendererTests.class); 80 suite.addTestSuite(WindItemRendererTests.class); 81 suite.addTestSuite(XYAreaRendererTests.class); 82 suite.addTestSuite(XYAreaRenderer2Tests.class); 83 suite.addTestSuite(XYBarRendererTests.class); 84 suite.addTestSuite(XYBoxAndWhiskerRendererTests.class); 85 suite.addTestSuite(XYBubbleRendererTests.class); 86 suite.addTestSuite(XYDifferenceRendererTests.class); 87 suite.addTestSuite(XYDotRendererTests.class); 88 suite.addTestSuite(XYErrorRendererTests.class); 89 suite.addTestSuite(XYLineAndShapeRendererTests.class); 90 suite.addTestSuite(XYStepRendererTests.class); 91 suite.addTestSuite(XYStepAreaRendererTests.class); 92 suite.addTestSuite(YIntervalRendererTests.class); 93 return suite; 94 } 95 96 101 public RendererXYPackageTests(String name) { 102 super(name); 103 } 104 105 110 public static XYSeriesCollection createTestXYSeriesCollection() { 111 XYSeriesCollection result = new XYSeriesCollection(); 112 XYSeries series1 = new XYSeries("Series 1", false, false); 113 series1.add(1.0, 2.0); 114 series1.add(2.0, 5.0); 115 XYSeries series2 = new XYSeries("Series 2", false, false); 116 series2.add(1.0, 4.0); 117 series2.add(2.0, 3.0); 118 result.addSeries(series1); 119 result.addSeries(series2); 120 return result; 121 } 122 123 128 public static TableXYDataset createTestTableXYDataset() { 129 DefaultTableXYDataset result = new DefaultTableXYDataset(); 130 XYSeries series1 = new XYSeries("Series 1", false, false); 131 series1.add(1.0, 2.0); 132 series1.add(2.0, 5.0); 133 XYSeries series2 = new XYSeries("Series 2", false, false); 134 series2.add(1.0, 4.0); 135 series2.add(2.0, 3.0); 136 result.addSeries(series1); 137 result.addSeries(series2); 138 return result; 139 } 140 141 146 public static void main(String [] args) { 147 junit.textui.TestRunner.run(suite()); 148 } 149 150 } 151 | Popular Tags |