public void test_internal_consistency_check_99904_rule_rate() { SBMLDocument d = new SBMLDocument(2,4); long errors; Rule r = new RateRule(2,4); d.setLevelAndVersion(1,2,false); Model m = d.createModel(); Compartment c = m.createCompartment(); c.setId("cc"); c.setConstant(false); r.setVariable("cc"); r.setFormula("2"); r.setMetaId("mmm"); m.addRule(r); errors = d.checkInternalConsistency(); assertTrue( errors == 0 ); d = null; }
public void test_RateRule_L1() { RateRule r = new RateRule(1,2); assertEquals( false, (r.hasRequiredAttributes()) ); r.setVariable("r"); assertEquals( false, (r.hasRequiredAttributes()) ); r.setFormula("r"); assertEquals( true, r.hasRequiredAttributes() ); r = null; }