public createAlgebraicRule ( ) : |
||
return |
public void test_AlgebraicRule_parent_create() { Model m = new Model(2,4); AlgebraicRule r = m.createAlgebraicRule(); ListOf lo = m.getListOfRules(); assertTrue( lo == m.getRule(0).getParentSBMLObject() ); assertTrue( lo == r.getParentSBMLObject() ); assertTrue( m == lo.getParentSBMLObject() ); }
public void test_AlgebraicRule_ancestor_create() { Model m = new Model(2,4); AlgebraicRule r = m.createAlgebraicRule(); ListOf lo = m.getListOfRules(); assertTrue( r.getAncestorOfType(libsbml.SBML_MODEL) == m ); assertTrue( r.getAncestorOfType(libsbml.SBML_LIST_OF) == lo ); assertTrue( r.getAncestorOfType(libsbml.SBML_DOCUMENT) == null ); assertTrue( r.getAncestorOfType(libsbml.SBML_EVENT) == null ); Rule obj = m.getRule(0); assertTrue( obj.getAncestorOfType(libsbml.SBML_MODEL) == m ); assertTrue( obj.getAncestorOfType(libsbml.SBML_LIST_OF) == lo ); assertTrue( obj.getAncestorOfType(libsbml.SBML_DOCUMENT) == null ); assertTrue( obj.getAncestorOfType(libsbml.SBML_EVENT) == null ); }