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;
        }
예제 #2
0
        public void test_InitialAssignment_clone()
        {
            InitialAssignment o1 = new InitialAssignment(2, 4);

            o1.setSymbol("c");
            assertTrue(o1.getId() == "c");
            InitialAssignment o2 = o1.clone();

            assertTrue(o2.getId() == "c");
            assertTrue(o2.getParentSBMLObject() == o1.getParentSBMLObject());
            o2 = null;
            o1 = null;
        }