setSubstanceUnits() public method

public setSubstanceUnits ( string sid ) : int
sid string
return int
コード例 #1
0
 public void test_Species_setSubstanceUnits4()
 {
     Species c = new  Species(2,2);
       int i = c.setSubstanceUnits( "mole");
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue((  "mole" == c.getSubstanceUnits() ));
       assertEquals( true, c.isSetSubstanceUnits() );
       i = c.setSubstanceUnits("");
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertEquals( false, c.isSetSubstanceUnits() );
       c = null;
 }
コード例 #2
0
 public void test_Species_setSubstanceUnits2()
 {
     Species c = new  Species(2,2);
       int i = c.setSubstanceUnits( "1cell");
       assertTrue( i == libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE );
       assertEquals( false, c.isSetSubstanceUnits() );
       c = null;
 }