use of kg.apc.charting.AbstractGraphPanelChartElement in project jmeter-plugins by undera.
the class GraphRowPercentilesTest method testIterator_req2.
@Test
public void testIterator_req2() {
System.out.println("iterator 2req");
GraphRowPercentiles instance = new GraphRowPercentiles();
instance.add(10, 1);
instance.add(20, 1);
Iterator<Entry<Long, AbstractGraphPanelChartElement>> result = instance.iterator();
Assert.assertNotNull(result);
Assert.assertTrue(result.hasNext());
int cnt = 0;
while (result.hasNext()) {
Entry<Long, AbstractGraphPanelChartElement> obj = result.next();
Assert.assertNotNull(obj);
// System.err.println(cnt + " " + obj.getValue().getValue());
assertEquals(cnt < 500 ? 10 : 20, obj.getValue().getValue(), 0.01);
cnt++;
}
Assert.assertEquals(expectedCount, cnt);
}
use of kg.apc.charting.AbstractGraphPanelChartElement in project jmeter-plugins by undera.
the class GraphRowAveragesTest method testGetLowerElement.
/**
* Test of getLowerElement method, of class GraphRowAverages.
*/
@Test
public void testGetLowerElement() {
System.out.println("getLowerElement");
long value = 0L;
AbstractGraphPanelChartElement expResult = null;
AbstractGraphPanelChartElement result = instance.getLowerElement(value);
assertEquals(expResult, result);
}
use of kg.apc.charting.AbstractGraphPanelChartElement 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.AbstractGraphPanelChartElement 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());
}
use of kg.apc.charting.AbstractGraphPanelChartElement in project jmeter-plugins by undera.
the class GraphRowPercentilesTest method testIterator_req3.
@Test
public void testIterator_req3() {
System.out.println("iterator 3req");
GraphRowPercentiles instance = new GraphRowPercentiles();
for (int n = 0; n < expectedCount; n++) {
instance.add(n, 1);
}
Iterator<Entry<Long, AbstractGraphPanelChartElement>> result = instance.iterator();
Assert.assertNotNull(result);
Assert.assertTrue(result.hasNext());
int cnt = 0;
while (result.hasNext()) {
Entry<Long, AbstractGraphPanelChartElement> obj = result.next();
Assert.assertNotNull(obj);
// System.err.println(cnt + " " + obj.getValue().getValue());
assertEquals(cnt, obj.getValue().getValue(), 0.01);
cnt++;
}
Assert.assertEquals(expectedCount, cnt);
}
Aggregations