* @author Miriam Sutter
*/
private void formula(String formulaValue, double realResult,
HashMap argumentMap) {
try {
TextTableFormula formula = new TextTableFormula(
new TextTableFormulaExpression(formulaValue));
IArgument[] arguments = formula.getArguments();
for (int i = 0; i < arguments.length; i++) {
arguments[i].setValue(argumentMap.get(arguments[i].getName()));
}
double result = formula.calcFormula();
Assert.assertEquals(result, realResult, 0.001);
} catch (Exception e) {
e.printStackTrace();
Assert.fail();
}