public void test_Model_addSpeciesType4() { Model m = new Model(2,2); SpeciesType st = new SpeciesType(2,2); st.setId( "st"); SpeciesType st1 = new SpeciesType(2,2); st1.setId( "st"); int i = m.addSpeciesType(st); assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS ); assertTrue( m.getNumSpeciesTypes() == 1 ); i = m.addSpeciesType(st1); assertTrue( i == libsbml.LIBSBML_DUPLICATE_OBJECT_ID ); assertTrue( m.getNumSpeciesTypes() == 1 ); st = null; st1 = null; m = null; }
public void test_internal_consistency_check_99905_st() { SBMLDocument d = new SBMLDocument(2,4); long errors; SpeciesType ct = new SpeciesType(2,4); Model m = d.createModel(); d.setLevelAndVersion(2,2,false); ct.setId("st"); ct.setSBOTerm(5); m.addSpeciesType(ct); errors = d.checkInternalConsistency(); assertTrue( errors == 0 ); d = null; }
public void test_Model_addSpeciesType2() { Model m = new Model(2,2); SpeciesType st = new SpeciesType(2,3); st.setId( "st"); int i = m.addSpeciesType(st); assertTrue( i == libsbml.LIBSBML_VERSION_MISMATCH ); assertTrue( m.getNumSpeciesTypes() == 0 ); st = null; m = null; }
public void test_SpeciesType_copyConstructor() { SpeciesType o1 = new SpeciesType(2,4); o1.setId("c"); assertTrue( o1.getId() == "c" ); SpeciesType o2 = new SpeciesType(o1); assertTrue( o2.getId() == "c" ); assertTrue( o2.getParentSBMLObject() == o1.getParentSBMLObject() ); o2 = null; o1 = null; }
public void test_SpeciesType_assignmentOperator() { SpeciesType o1 = new SpeciesType(2,4); o1.setId("c"); assertTrue( o1.getId() == "c" ); SpeciesType o2 = new SpeciesType(2,4); o2 = o1; assertTrue( o2.getId() == "c" ); assertTrue( o2.getParentSBMLObject() == o1.getParentSBMLObject() ); o2 = null; o1 = null; }
public void test_SpeciesType_parent_add() { SpeciesType ia = new SpeciesType(2,4); ia.setId("s"); Model m = new Model(2,4); m.addSpeciesType(ia); ia = null; ListOf lo = m.getListOfSpeciesTypes(); assertTrue( lo == m.getSpeciesType(0).getParentSBMLObject() ); assertTrue( m == lo.getParentSBMLObject() ); }
public void test_SpeciesType() { SpeciesType st = new SpeciesType(2,4); assertEquals( false, (st.hasRequiredAttributes()) ); st.setId("st"); assertEquals( true, st.hasRequiredAttributes() ); st = null; }
public void test_SpeciesType_ancestor_add() { SpeciesType ia = new SpeciesType(2,4); Model m = new Model(2,4); ia.setId("s"); m.addSpeciesType(ia); ia = null; ListOf lo = m.getListOfSpeciesTypes(); SpeciesType obj = m.getSpeciesType(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 ); }