}
@Test(dataProvider = "defaultTestCase", groups = "operators")
public void test(String formul, Object result)
{
Formula formula = null;
try
{
formula = new Formula(formul);
}
catch (ParseException e1)
{
Assert.fail("Error while parsing the formula", e1);
}
try
{
formula.initialize(context);
}
catch (EvaluationException e)
{
Assert.fail("Initialization Error", e);
}
Assert.assertEquals(formula.evaluate().getClass(), result.getClass());
Assert.assertEquals(formula.evaluate(), result);
}