createCompartmentType() 공개 메소드

public createCompartmentType ( ) : CompartmentType
리턴 CompartmentType
 public void test_CompartmentType_parent_create()
 {
     Model m = new Model(2,4);
       CompartmentType ct = m.createCompartmentType();
       ListOf lo = m.getListOfCompartmentTypes();
       assertTrue( lo == m.getCompartmentType(0).getParentSBMLObject() );
       assertTrue( lo == ct.getParentSBMLObject() );
       assertTrue( m == lo.getParentSBMLObject() );
 }
예제 #2
0
 public void test_CompartmentType_ancestor_create()
 {
     Model m = new Model(2,4);
       CompartmentType ct = m.createCompartmentType();
       ListOf lo = m.getListOfCompartmentTypes();
       assertTrue( ct.getAncestorOfType(libsbml.SBML_MODEL) == m );
       assertTrue( ct.getAncestorOfType(libsbml.SBML_LIST_OF) == lo );
       assertTrue( ct.getAncestorOfType(libsbml.SBML_DOCUMENT) == null );
       assertTrue( ct.getAncestorOfType(libsbml.SBML_EVENT) == null );
       CompartmentType obj = m.getCompartmentType(0);
       assertTrue( obj.getAncestorOfType(libsbml.SBML_MODEL) == m );
       assertTrue( obj.getAncestorOfType(libsbml.SBML_LIST_OF) == lo );
       assertTrue( obj.getAncestorOfType(libsbml.SBML_DOCUMENT) == null );
       assertTrue( obj.getAncestorOfType(libsbml.SBML_EVENT) == null );
 }
예제 #3
0
 public void test_Model_createCompartmentType()
 {
     Model m = new  Model(2,2);
       CompartmentType p = m.createCompartmentType();
       assertTrue( m.getNumCompartmentTypes() == 1 );
       assertTrue( (p).getLevel() == 2 );
       assertTrue( (p).getVersion() == 2 );
       m = null;
 }