setCompartmentType() public method

public setCompartmentType ( string sid ) : int
sid string
return int
コード例 #1
0
 public void test_Compartment_setCompartmentType2()
 {
     Compartment c = new  Compartment(2,2);
       int i = c.setCompartmentType( "1cell");
       assertTrue( i == libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE );
       assertEquals( false, c.isSetCompartmentType() );
       i = c.unsetCompartmentType();
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertEquals( false, c.isSetCompartmentType() );
       c = null;
 }
コード例 #2
0
 public void test_internal_consistency_check_99902()
 {
     SBMLDocument d = new SBMLDocument(2,4);
       long errors;
       Compartment c = new Compartment(2,4);
       d.setLevelAndVersion(1,2,false);
       Model m = d.createModel();
       c.setCompartmentType("hh");
       c.setId("c");
       m.addCompartment(c);
       errors = d.checkInternalConsistency();
       assertTrue( errors == 1 );
       assertTrue( d.getError(0).getErrorId() == 10103 );
       d = null;
 }
コード例 #3
0
 public void test_Compartment_setCompartmentType4()
 {
     Compartment c = new  Compartment(2,2);
       int i = c.setCompartmentType("");
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertEquals( false, c.isSetCompartmentType() );
       c = null;
 }