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

public isSetVolume ( ) : bool
Результат bool
 public void test_Compartment_setVolume2()
 {
     Compartment c = new  Compartment(2,2);
       int i = c.setVolume(4);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue( c.getVolume() == 4.0 );
       assertEquals( true, c.isSetVolume() );
       i = c.unsetVolume();
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertEquals( false, c.isSetVolume() );
       c = null;
 }
Пример #2
0
 public void test_L3_Compartment_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(3,1);
       sbmlns.addNamespaces(xmlns);
       Compartment c = new  Compartment(sbmlns);
       assertTrue( c.getTypeCode() == libsbml.SBML_COMPARTMENT );
       assertTrue( c.getMetaId() == "" );
       assertTrue( c.getNotes() == null );
       assertTrue( c.getAnnotation() == null );
       assertTrue( c.getLevel() == 3 );
       assertTrue( c.getVersion() == 1 );
       assertTrue( c.getNamespaces() != null );
       assertTrue( c.getNamespaces().getLength() == 2 );
       assertTrue( c.getId() == "" );
       assertTrue( c.getName() == "" );
       assertTrue( c.getUnits() == "" );
       assertTrue( c.getOutside() == "" );
       assertEquals( true, isnan(c.getSpatialDimensionsAsDouble()) );
       assertEquals( true, isnan(c.getVolume()) );
       assertTrue( c.getConstant() == true );
       assertEquals( false, c.isSetId() );
       assertEquals( false, c.isSetSpatialDimensions() );
       assertEquals( false, c.isSetName() );
       assertEquals( false, c.isSetSize() );
       assertEquals( false, c.isSetVolume() );
       assertEquals( false, c.isSetUnits() );
       assertEquals( false, c.isSetOutside() );
       assertEquals( false, c.isSetConstant() );
       c = null;
 }
Пример #3
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="item"></param>
 /// <returns></returns>
 public static double GetCompartmentVolume(Compartment item)
 {
     double aVolume;
     if (item.isSetVolume())
         aVolume = item.getVolume();
     else
         aVolume = double.NaN;
     return aVolume;
 }