public getProduct ( long n ) : |
||
n | long | |
Résultat |
public void test_SpeciesReference_Product_parent_create() { Reaction r = new Reaction(2,4); SpeciesReference sr = r.createProduct(); ListOf lo = r.getListOfProducts(); assertTrue( lo == r.getProduct(0).getParentSBMLObject() ); assertTrue( lo == sr.getParentSBMLObject() ); assertTrue( r == lo.getParentSBMLObject() ); }
public void test_SpeciesReference_Product_ancestor_create() { Reaction r = new Reaction(2,4); SpeciesReference sr = r.createProduct(); ListOf lo = r.getListOfProducts(); assertTrue( sr.getAncestorOfType(libsbml.SBML_REACTION) == r ); assertTrue( sr.getAncestorOfType(libsbml.SBML_LIST_OF) == lo ); assertTrue( sr.getAncestorOfType(libsbml.SBML_DOCUMENT) == null ); assertTrue( sr.getAncestorOfType(libsbml.SBML_COMPARTMENT) == null ); SpeciesReference obj = r.getProduct(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 ); }
public void test_SpeciesReference_Product_parent_add() { SpeciesReference sr = new SpeciesReference(2,4); Reaction r = new Reaction(2,4); sr.setSpecies("p"); r.addProduct(sr); sr = null; ListOf lo = r.getListOfProducts(); assertTrue( lo == r.getProduct(0).getParentSBMLObject() ); assertTrue( r == lo.getParentSBMLObject() ); }
public void test_SpeciesReference_Product_ancestor_add() { SpeciesReference sr = new SpeciesReference(2,4); Reaction r = new Reaction(2,4); sr.setSpecies("p"); r.addProduct(sr); sr = null; ListOf lo = r.getListOfProducts(); SpeciesReference obj = r.getProduct(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 ); }