// TODO : API changes, setVariable function is not in the Rule Class.
@Test
public void test_Model_getRules() throws ParseException {
Rule ar = new AlgebraicRule(2, 4);
AssignmentRule scr = new AssignmentRule(2, 4);
AssignmentRule cvr = new AssignmentRule(2, 4);
AssignmentRule pr = new AssignmentRule(2, 4);
scr.setVariable("r2");
cvr.setVariable("r3");
pr.setVariable("r4");
ar.setFormula("x + 1");
scr.setFormula("k * t/(1 + k)");
cvr.setFormula("0.10 * t");
pr.setFormula("k3/k2");
M.addRule(ar);
M.addRule(scr);
M.addRule(cvr);
M.addRule(pr);
assertTrue(M.getNumRules() == 4);
ar = M.getRule(0);
scr = (AssignmentRule) M.getRule(1);
cvr = (AssignmentRule) M.getRule(2);
pr = (AssignmentRule) M.getRule(3);
assertTrue(ar.getFormula().equals("x+1")); // .equals("x + 1")
assertTrue(scr.getFormula().equals("k*t/(1+k)")); // .equals("k * t/(1 + k)"));
assertTrue(cvr.getFormula().equals("0.1*t")); // .equals("0.10 * t"));
assertTrue(pr.getFormula().equals("k3/k2"));
}