Search in sources :

Example 1 with GraphPanelChartAverageElement

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);
}
Also used : GraphPanelChartAverageElement(kg.apc.charting.elements.GraphPanelChartAverageElement)

Example 2 with GraphPanelChartAverageElement

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());
}
Also used : GraphPanelChartAverageElement(kg.apc.charting.elements.GraphPanelChartAverageElement) AbstractGraphPanelChartElement(kg.apc.charting.AbstractGraphPanelChartElement)

Example 3 with GraphPanelChartAverageElement

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);
}
Also used : GraphRowOverallAverages(kg.apc.charting.rows.GraphRowOverallAverages) GraphPanelChartAverageElement(kg.apc.charting.elements.GraphPanelChartAverageElement)

Example 4 with GraphPanelChartAverageElement

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) {
    }
}
Also used : GraphRowOverallAverages(kg.apc.charting.rows.GraphRowOverallAverages) GraphPanelChartAverageElement(kg.apc.charting.elements.GraphPanelChartAverageElement) AbstractGraphPanelChartElement(kg.apc.charting.AbstractGraphPanelChartElement)

Example 5 with GraphPanelChartAverageElement

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());
}
Also used : GraphRowOverallAverages(kg.apc.charting.rows.GraphRowOverallAverages) GraphPanelChartAverageElement(kg.apc.charting.elements.GraphPanelChartAverageElement) AbstractGraphPanelChartElement(kg.apc.charting.AbstractGraphPanelChartElement)

Aggregations

GraphPanelChartAverageElement (kg.apc.charting.elements.GraphPanelChartAverageElement)7 AbstractGraphPanelChartElement (kg.apc.charting.AbstractGraphPanelChartElement)3 GraphRowOverallAverages (kg.apc.charting.rows.GraphRowOverallAverages)3