getProduct() public method

public getProduct ( long n ) : SpeciesReference
n long
return SpeciesReference
コード例 #1
0
 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() );
 }
コード例 #2
0
ファイル: TestAncestor.cs プロジェクト: mgaldzic/copasi_api
 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 );
 }
コード例 #3
0
 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() );
 }
コード例 #4
0
ファイル: TestAncestor.cs プロジェクト: mgaldzic/copasi_api
 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 );
 }