use of kg.apc.emulators.TestGraphics in project jmeter-plugins by undera.
the class GraphPanelChartTest method testPaintComponent.
/**
* Test of paintComponent method, of class GraphPanelChart.
*/
@Test
public void testPaintComponent() {
System.out.println("paintComponent");
Graphics g = new TestGraphics();
GraphPanelChart instance = new GraphPanelChart();
instance.setSize(500, 500);
instance.getChartSettings().setDrawFinalZeroingLines(true);
instance.getChartSettings().setDrawCurrentX(true);
instance.getChartSettings().setExpendRows(true);
final ConcurrentSkipListMap<String, AbstractGraphRow> rows = new ConcurrentSkipListMap<String, AbstractGraphRow>();
instance.setRows(rows);
final GraphRowAverages row1 = new GraphRowAverages();
row1.setDrawThickLines(true);
row1.setDrawLine(true);
row1.setDrawBar(true);
row1.setDrawValueLabel(true);
row1.setMarkerSize(AbstractGraphRow.MARKER_SIZE_BIG);
rows.put("test 1", row1);
row1.add(System.currentTimeMillis(), 20);
instance.paintComponent(g);
row1.add(System.currentTimeMillis(), 540);
instance.setxAxisLabelRenderer(new DateTimeRenderer("HH:mm:ss"));
instance.paintComponent(g);
row1.add(System.currentTimeMillis(), 8530);
instance.paintComponent(g);
}
use of kg.apc.emulators.TestGraphics in project jmeter-plugins by undera.
the class GraphPanelChartTest method testPaintComponent_empty.
/**
*/
@Test
public void testPaintComponent_empty() {
System.out.println("paintComponent_empty");
Graphics g = new TestGraphics();
GraphPanelChart instance = new GraphPanelChart();
instance.setSize(500, 500);
instance.getChartSettings().setDrawFinalZeroingLines(false);
final ConcurrentSkipListMap<String, AbstractGraphRow> rows = new ConcurrentSkipListMap<String, AbstractGraphRow>();
instance.setRows(rows);
instance.paintComponent(g);
}
Aggregations