Skip to content

Commit

Permalink
Merge pull request #26 from U-QASAR/scholze
Browse files Browse the repository at this point in the history
Improvement
  • Loading branch information
schlotze committed Jun 2, 2016
2 parents 98b5161 + ee0ff8a commit ca49e95
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/test/java/eu/uqasar/model/formula/FormulaTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,18 @@ public class FormulaTest {
@Test
public void testEvalFormulaStr() {

logger.info("Test eval formula String");

logger.info("Test eval formula String");

Double result;
Double expected = 15.0;
String evalStr = "5*3";
Object resObject = Formula.evalFormulaStr(evalStr);
Assert.assertNotNull(resObject);
Double result = (Double) resObject;
Assert.assertNotNull(resObject);
if (resObject instanceof Integer) {
result = ((Integer) resObject).doubleValue();
} else {
result = (Double) resObject;
}
Assert.assertEquals(expected, result);
}

Expand Down

0 comments on commit ca49e95

Please sign in to comment.