public void test_InitialAssignment_parent_create() { Model m = new Model(2, 4); InitialAssignment ia = m.createInitialAssignment(); ListOf lo = m.getListOfInitialAssignments(); assertTrue(lo == m.getInitialAssignment(0).getParentSBMLObject()); assertTrue(lo == ia.getParentSBMLObject()); assertTrue(m == lo.getParentSBMLObject()); }
public void test_InitialAssignment_parent_NULL() { SBMLDocument d = new SBMLDocument(); Model m = d.createModel(); InitialAssignment c = m.createInitialAssignment(); InitialAssignment c1 = c.clone(); d = null; assertTrue(c1.getAncestorOfType(libsbml.SBML_MODEL) == null); assertTrue(c1.getParentSBMLObject() == null); assertEquals(c1.getSBMLDocument(), null); c1 = null; }
public void test_InitialAssignment_copyConstructor() { InitialAssignment o1 = new InitialAssignment(2, 4); o1.setSymbol("c"); assertTrue(o1.getId() == "c"); InitialAssignment o2 = new InitialAssignment(o1); assertTrue(o2.getId() == "c"); assertTrue(o2.getParentSBMLObject() == o1.getParentSBMLObject()); o2 = null; o1 = null; }