setHasOnlySubstanceUnits() public method

public setHasOnlySubstanceUnits ( bool value ) : int
value bool
return int
 public void test_internal_consistency_check_99919()
 {
     SBMLDocument d = new SBMLDocument(2,4);
       long errors;
       Species s = new Species(2,4);
       d.setLevelAndVersion(1,2,false);
       Model m = d.createModel();
       Compartment c = m.createCompartment();
       c.setId("c");
       s.setId("s");
       s.setCompartment("c");
       s.setHasOnlySubstanceUnits(true);
       m.addSpecies(s);
       errors = d.checkInternalConsistency();
       assertTrue( errors == 0 );
       d = null;
 }
Exemplo n.º 2
0
 public void test_L3_Species_hasRequiredAttributes()
 {
     Species s = new  Species(3,1);
       assertEquals( false, s.hasRequiredAttributes() );
       s.setId( "id");
       assertEquals( false, s.hasRequiredAttributes() );
       s.setCompartment( "cell");
       assertEquals( false, s.hasRequiredAttributes() );
       s.setHasOnlySubstanceUnits(false);
       assertEquals( false, s.hasRequiredAttributes() );
       s.setBoundaryCondition(false);
       assertEquals( false, s.hasRequiredAttributes() );
       s.setConstant(false);
       assertEquals( true, s.hasRequiredAttributes() );
       s = null;
 }
Exemplo n.º 3
0
 public void test_Species_setHasOnlySubstanceUnits2()
 {
     Species c = new  Species(2,2);
       int i = c.setHasOnlySubstanceUnits(false);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue( c.getHasOnlySubstanceUnits() == false );
       i = c.setHasOnlySubstanceUnits(true);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue( c.getHasOnlySubstanceUnits() == true );
       c = null;
 }