public void test_SBase_setModelHistoryL3() { SBase sb = new Species(3,1); sb.setMetaId("_s"); ModelHistory mh = new ModelHistory(); ModelCreator mc = new ModelCreator(); Date date = new Date(2005,12,30,12,15,45,1,2,0); mc.setFamilyName( "Keating"); mc.setGivenName( "Sarah"); mc.setEmail( "*****@*****.**"); mc.setOrganisation( "UH"); mh.addCreator(mc); mh.setCreatedDate(date); mh.setModifiedDate(date); int i = sb.setModelHistory(mh); assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS ); assertTrue( sb.isSetModelHistory() == true ); mh = sb.getModelHistory(); assertTrue( mh != null ); sb.unsetModelHistory(); mh = sb.getModelHistory(); assertTrue( sb.isSetModelHistory() == false ); assertTrue( mh == null ); mh = null; }
public void test_internal_consistency_check_99904_species() { SBMLDocument d = new SBMLDocument(2,4); long errors; Species s = new Species(2,4); d.setLevelAndVersion(1,2,false); Model m = d.createModel(); Compartment c = m.createCompartment(); c.setId("c"); s.setCompartment("c"); s.setId("s"); s.setMetaId("mmm"); m.addSpecies(s); errors = d.checkInternalConsistency(); assertTrue( errors == 0 ); d = null; }