setStoichiometryMath() public method

public setStoichiometryMath ( StoichiometryMath math ) : int
math StoichiometryMath
return int
コード例 #1
0
 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;
 }
コード例 #2
0
ファイル: TestSbmlFunction.cs プロジェクト: ecell/ecell3-ide
 public void TestStoichiometryMath()
 {
     SpeciesReference sr = new SpeciesReference(2,3);
     sr.setId("S0");
     sr.setStoichiometry(0);
     sr.setStoichiometryMath(new StoichiometryMath(2, 3));
     string math = SbmlFunctions.GetStoichiometryMath(sr);
     Assert.AreEqual(null, math, "GetStoichiometryMath returns unexpected value.");
 }
コード例 #3
0
 public void test_SpeciesReference_setStoichiometryMath5()
 {
     SpeciesReference sr1 = new  SpeciesReference(1,2);
       StoichiometryMath sm = new  StoichiometryMath(2,4);
       ASTNode math = new  ASTNode(libsbml.AST_TIMES);
       ASTNode a = new  ASTNode();
       ASTNode b = new  ASTNode();
       a.setName( "a");
       b.setName( "b");
       math.addChild(a);
       math.addChild(b);
       sm.setMath(math);
       int i = sr1.setStoichiometryMath(sm);
       assertTrue( i == libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE );
       assertEquals( false, sr1.isSetStoichiometryMath() );
       sm = null;
       sr1 = null;
 }
コード例 #4
0
ファイル: TestAncestor.cs プロジェクト: mgaldzic/copasi_api
 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;
 }