public addModifier ( |
||
msr | ||
Résultat | int |
public void test_SpeciesReference_Modifier_parent_add() { ModifierSpeciesReference sr = new ModifierSpeciesReference(2,4); sr.setSpecies("s"); Reaction r = new Reaction(2,4); r.addModifier(sr); sr = null; ListOf lo = r.getListOfModifiers(); assertTrue( lo == r.getModifier(0).getParentSBMLObject() ); assertTrue( r == lo.getParentSBMLObject() ); }
public void test_SpeciesReference_Modifier_ancestor_add() { ModifierSpeciesReference sr = new ModifierSpeciesReference(2,4); sr.setSpecies("s"); Reaction r = new Reaction(2,4); r.addModifier(sr); sr = null; ListOf lo = r.getListOfModifiers(); ModifierSpeciesReference obj = r.getModifier(0); assertTrue( obj.getAncestorOfType(libsbml.SBML_REACTION) == r ); assertTrue( obj.getAncestorOfType(libsbml.SBML_LIST_OF) == lo ); assertTrue( obj.getAncestorOfType(libsbml.SBML_DOCUMENT) == null ); assertTrue( obj.getAncestorOfType(libsbml.SBML_COMPARTMENT) == null ); }