public void test_Species_setSpeciesType4() { Species c = new Species(2,2); int i = c.setSpeciesType( "cell"); assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS ); assertEquals( true, c.isSetSpeciesType() ); assertTrue(( "cell" == c.getSpeciesType() )); i = c.setSpeciesType(""); assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS ); assertEquals( false, c.isSetSpeciesType() ); c = null; }
public void test_internal_consistency_check_99918() { 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.setId("s"); s.setCompartment("c"); s.setSpeciesType("kkk"); m.addSpecies(s); errors = d.checkInternalConsistency(); assertTrue( errors == 0 ); d = null; }
public void test_Species_setSpeciesType2() { Species c = new Species(2,2); int i = c.setSpeciesType( "1cell"); assertTrue( i == libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE ); assertEquals( false, c.isSetSpeciesType() ); i = c.unsetSpeciesType(); assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS ); assertEquals( false, c.isSetSpeciesType() ); c = null; }
public void test_Species_copyConstructor() { Species o1 = new Species(2,4); o1.setId("c"); o1.setSpeciesType("c1"); assertTrue( o1.getId() == "c" ); assertEquals(o1.getSpeciesType(), "c1"); Species o2 = new Species(o1); assertTrue( o2.getId() == "c" ); assertEquals(o2.getSpeciesType(), "c1"); assertTrue( o2.getParentSBMLObject() == o1.getParentSBMLObject() ); o2 = null; o1 = null; }