createModifier() public method

public createModifier ( ) : ModifierSpeciesReference
return ModifierSpeciesReference
Exemplo n.º 1
0
 public void test_SpeciesReference_Modifier_ancestor_create_model()
 {
     Model m = new Model(2,4);
       Reaction r = m.createReaction();
       ModifierSpeciesReference sr = m.createModifier();
       ListOf lo = r.getListOfModifiers();
       assertTrue( sr.getAncestorOfType(libsbml.SBML_REACTION) == r );
       assertTrue( sr.getAncestorOfType(libsbml.SBML_LIST_OF) == lo );
       assertTrue( sr.getAncestorOfType(libsbml.SBML_MODEL) == m );
       assertTrue( sr.getAncestorOfType(libsbml.SBML_DOCUMENT) == null );
       assertTrue( sr.getAncestorOfType(libsbml.SBML_COMPARTMENT) == null );
       ModifierSpeciesReference obj = r.getModifier(0);
       assertTrue( obj.getAncestorOfType(libsbml.SBML_REACTION) == r );
       assertTrue( obj.getAncestorOfType(libsbml.SBML_LIST_OF) == lo );
       assertTrue( obj.getAncestorOfType(libsbml.SBML_MODEL) == m );
       assertTrue( obj.getAncestorOfType(libsbml.SBML_DOCUMENT) == null );
       assertTrue( obj.getAncestorOfType(libsbml.SBML_COMPARTMENT) == null );
 }
 public void test_SpeciesReference_Modifier_parent_create_model()
 {
     Model m = new Model(2,4);
       Reaction r = m.createReaction();
       ModifierSpeciesReference sr = m.createModifier();
       ListOf lo = r.getListOfModifiers();
       assertTrue( lo == sr.getParentSBMLObject() );
       assertTrue( lo == r.getModifier(0).getParentSBMLObject() );
       assertTrue( r == lo.getParentSBMLObject() );
 }
Exemplo n.º 3
0
 public void test_Model_createModifier()
 {
     Model m = new  Model(2,2);
       Reaction p = m.createReaction();
       ModifierSpeciesReference sr = m.createModifier();
       assertTrue( p.getNumModifiers() == 1 );
       assertTrue( (sr).getLevel() == 2 );
       assertTrue( (sr).getVersion() == 2 );
       m = null;
 }