public void test_StoichiometryMath_ancestor_create() { SpeciesReference sr = new SpeciesReference(2,4); StoichiometryMath sm = sr.createStoichiometryMath(); assertTrue( sm.getAncestorOfType(libsbml.SBML_SPECIES_REFERENCE) == sr ); assertTrue( sm.getAncestorOfType(libsbml.SBML_DOCUMENT) == null ); assertTrue( sm.getAncestorOfType(libsbml.SBML_COMPARTMENT) == null ); StoichiometryMath obj = sr.getStoichiometryMath(); assertTrue( obj.getAncestorOfType(libsbml.SBML_SPECIES_REFERENCE) == sr ); assertTrue( obj.getAncestorOfType(libsbml.SBML_DOCUMENT) == null ); assertTrue( obj.getAncestorOfType(libsbml.SBML_COMPARTMENT) == null ); }
public void test_StoichiometryMath_parent_add() { StoichiometryMath m = new StoichiometryMath(2,4); SpeciesReference sr = new SpeciesReference(2,4); sr.setStoichiometryMath(m); m = null; assertTrue( sr == sr.getStoichiometryMath().getParentSBMLObject() ); sr = null; }
public void test_StoichiometryMath_ancestor_add() { StoichiometryMath m = new StoichiometryMath(2,4); SpeciesReference sr = new SpeciesReference(2,4); sr.setStoichiometryMath(m); m = null; StoichiometryMath obj = sr.getStoichiometryMath(); assertTrue( obj.getAncestorOfType(libsbml.SBML_SPECIES_REFERENCE) == sr ); assertTrue( obj.getAncestorOfType(libsbml.SBML_MODEL) == null ); assertTrue( obj.getAncestorOfType(libsbml.SBML_DOCUMENT) == null ); sr = null; }