Exemplo n.º 1
0
        public void test_AssignmentRule_ancestor_create()
        {
            Model          m  = new Model(2, 4);
            AssignmentRule r  = m.createAssignmentRule();
            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);
        }