/** * Test method for {@link * de.uniluebeck.itm.spyglass.plugin.simpleglobalinformation.StatisticalOperation#getValue(de.uniluebeck.itm.spyglass.plugin.simpleglobalinformation.StatisticalInformationEvaluator.STATISTICAL_OPERATIONS)} * . */ @Test public final void testGetValueMEDIAN3() { final StatisticalOperation so = new StatisticalOperation(4, STATISTICAL_OPERATIONS.MAX); so.addValue(10); so.addValue(4); so.addValue(7); so.addValue(5); so.addValue(9); so.addValue(3); assertEquals((float) 5, so.getValue(STATISTICAL_OPERATIONS.MEDIAN), 0.0); }
/** * Test method for {@link * de.uniluebeck.itm.spyglass.plugin.simpleglobalinformation.StatisticalOperation#getValue(de.uniluebeck.itm.spyglass.plugin.simpleglobalinformation.StatisticalInformationEvaluator.STATISTICAL_OPERATIONS)} * . */ @Test public final void testGetValueAVG2() { final StatisticalOperation so = new StatisticalOperation(4, STATISTICAL_OPERATIONS.SUM); so.addValue(1); so.addValue(4); so.addValue(7); so.addValue(5); so.addValue(9); so.addValue(3); assertEquals((float) (24 / 4), so.getValue(STATISTICAL_OPERATIONS.AVG), 0.0); }