/** Test of size method, of class GraphRowSimple. */ @Test public void testSize() { System.out.println("size"); int expResult = 2; instance.add(1000, 3); instance.add(1000, 2); instance.add(2000, 1); int result = instance.size(); assertEquals(expResult, result); }
/** Test of getElement method, of class GraphRowSimple. */ @Test public void testGetElement() { System.out.println("getElement"); long value = 100L; AbstractGraphPanelChartElement expResult = new GraphPanelChartSimpleElement(10); instance.add(value, 10); AbstractGraphPanelChartElement result = instance.getElement(value); assertTrue(result.getValue() == expResult.getValue()); }
/** Test of add method, of class GraphRowSimple. */ @Test public void testAdd() { System.out.println("add"); long xVal = 10; double yVal = 5.0; instance.add(xVal, yVal); double[] minMax = instance.getMinMaxY(-1); assertEquals(xVal, instance.getMinX()); assertEquals(xVal, instance.getMaxX()); assertEquals(yVal, minMax[0], 0.001); assertEquals(yVal, minMax[1], 0.001); }