public void test_CompartmentType_setId2() { int i = C.setId("1cell"); assertTrue(i == libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE); assertEquals(false, C.isSetId()); }
public void test_CompartmentType() { CompartmentType ct = new CompartmentType(2, 4); assertEquals(false, (ct.hasRequiredAttributes())); ct.setId("c"); assertEquals(true, ct.hasRequiredAttributes()); ct = null; }
public void test_CompartmentType_parent_add() { CompartmentType ct = new CompartmentType(2, 4); Model m = new Model(2, 4); ct.setId("ct"); m.addCompartmentType(ct); ct = null; ListOf lo = m.getListOfCompartmentTypes(); assertTrue(lo == m.getCompartmentType(0).getParentSBMLObject()); assertTrue(m == lo.getParentSBMLObject()); }
public void test_Model_addCompartmentType2() { Model m = new Model(2, 2); CompartmentType ct = new CompartmentType(2, 3); ct.setId("ct"); int i = m.addCompartmentType(ct); assertTrue(i == libsbml.LIBSBML_VERSION_MISMATCH); assertTrue(m.getNumCompartmentTypes() == 0); ct = null; m = null; }
public void test_CompartmentType_copyConstructor() { CompartmentType o1 = new CompartmentType(2, 4); o1.setId("c"); assertTrue(o1.getId() == "c"); CompartmentType o2 = new CompartmentType(o1); assertTrue(o2.getId() == "c"); assertTrue(o2.getParentSBMLObject() == o1.getParentSBMLObject()); o2 = null; o1 = null; }
public void test_Model_addCompartmentType1() { Model m = new Model(2, 2); CompartmentType ct = new CompartmentType(2, 2); int i = m.addCompartmentType(ct); assertTrue(i == libsbml.LIBSBML_INVALID_OBJECT); ct.setId("ct"); i = m.addCompartmentType(ct); assertTrue(i == libsbml.LIBSBML_OPERATION_SUCCESS); assertTrue(m.getNumCompartmentTypes() == 1); ct = null; m = null; }
public void test_CompartmentType_assignmentOperator() { CompartmentType o1 = new CompartmentType(2, 4); o1.setId("c"); assertTrue(o1.getId() == "c"); CompartmentType o2 = new CompartmentType(2, 4); o2 = o1; assertTrue(o2.getId() == "c"); assertTrue(o2.getParentSBMLObject() == o1.getParentSBMLObject()); o2 = null; o1 = null; }
public void test_CompartmentType_setId() { string id = "mitochondria"; CT.setId(id); assertTrue((id == CT.getId())); assertEquals(true, CT.isSetId()); if (CT.getId() == id) { ; } { } CT.setId(CT.getId()); assertTrue((id == CT.getId())); CT.setId(""); assertEquals(false, CT.isSetId()); if (CT.getId() != null) { ; } { } }
public void test_CompartmentType_ancestor_add() { CompartmentType ct = new CompartmentType(2, 4); Model m = new Model(2, 4); ct.setId("ct"); m.addCompartmentType(ct); ct = null; ListOf lo = m.getListOfCompartmentTypes(); 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); }