setConstant() публичный Метод

public setConstant ( bool value ) : int
value bool
Результат int
 public void test_internal_consistency_check_99903()
 {
     SBMLDocument d = new SBMLDocument(2,4);
       long errors;
       Compartment c = new Compartment(2,4);
       d.setLevelAndVersion(1,2,false);
       Model m = d.createModel();
       c.setConstant(true);
       c.setId("c");
       m.addCompartment(c);
       Rule r = m.createAssignmentRule();
       r.setVariable("c");
       r.setFormula("2*3");
       errors = d.checkInternalConsistency();
       assertTrue( errors == 3 );
       d = null;
 }
Пример #2
0
 public void test_L3_Compartment_hasRequiredAttributes()
 {
     Compartment c = new  Compartment(3,1);
       assertEquals( false, c.hasRequiredAttributes() );
       c.setId( "id");
       assertEquals( false, c.hasRequiredAttributes() );
       c.setConstant(false);
       assertEquals( true, c.hasRequiredAttributes() );
       c = null;
 }
 public void test_Compartment_setConstant2()
 {
     Compartment c = new  Compartment(2,2);
       int i = c.setConstant(false);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue( c.getConstant() == false );
       c = null;
 }