use of kg.apc.charting.elements.GraphPanelChartAverageElement in project jmeter-plugins by undera.
the class GraphRowAverages method add.
/**
* @param xVal
* @param yVal
*/
@Override
public void add(long xVal, double yVal) {
GraphPanelChartAverageElement el;
if (values.containsKey(xVal)) {
el = (GraphPanelChartAverageElement) values.get(xVal);
el.add(yVal);
yVal = el.getValue();
} else {
el = new GraphPanelChartAverageElement(yVal);
values.put(xVal, el);
}
super.add(xVal, yVal);
}
use of kg.apc.charting.elements.GraphPanelChartAverageElement in project jmeter-plugins by undera.
the class GraphRowAveragesTest method testGetElement.
/**
* Test of getElement method, of class GraphRowAverages.
*/
@Test
public void testGetElement() {
System.out.println("getElement");
long value = 100L;
AbstractGraphPanelChartElement expResult = new GraphPanelChartAverageElement(10);
instance.add(value, 10);
AbstractGraphPanelChartElement result = instance.getElement(value);
Assert.assertTrue(instance.getElement(value).getValue() == expResult.getValue());
}
use of kg.apc.charting.elements.GraphPanelChartAverageElement in project jmeter-plugins by undera.
the class GraphRowOverallAveragesTest method testGetValue.
/**
* Test of getValue method, of class GraphRowOverallAverages.
*/
@Test
public void testGetValue() {
System.out.println("getValue");
GraphRowOverallAverages instance = new GraphRowOverallAverages();
GraphPanelChartAverageElement result = instance.getValue();
assertEquals(0, result.getValue(), 0.01);
}
use of kg.apc.charting.elements.GraphPanelChartAverageElement in project jmeter-plugins by undera.
the class GraphRowOverallAveragesTest method testSetValue.
/**
* Test of setValue method, of class GraphRowOverallAverages.
*/
@Test
public void testSetValue() {
System.out.println("setValue");
GraphPanelChartAverageElement value = null;
GraphRowOverallAverages instance = new GraphRowOverallAverages();
try {
AbstractGraphPanelChartElement result = instance.setValue(value);
Assert.fail("Exception expected");
} catch (UnsupportedOperationException e) {
}
}
use of kg.apc.charting.elements.GraphPanelChartAverageElement in project jmeter-plugins by undera.
the class GraphRowOverallAveragesTest method testGetElement.
/**
* Test of getElement method, of class GraphRowOverallAverages.
*/
@Test
public void testGetElement() {
System.out.println("getElement");
long value = 100L;
GraphRowOverallAverages instance = new GraphRowOverallAverages();
AbstractGraphPanelChartElement expResult = new GraphPanelChartAverageElement(10);
instance.add(value, 10);
AbstractGraphPanelChartElement result = instance.getElement(value);
Assert.assertTrue(instance.getElement(value).getValue() == expResult.getValue());
}
Aggregations