public void test_Compartment_parent_NULL()
        {
            SBMLDocument d  = new SBMLDocument();
            Model        m  = d.createModel();
            Compartment  c  = m.createCompartment();
            Compartment  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_Compartment_clone()
        {
            Compartment o1 = new Compartment(2, 4);

            o1.setId("c");
            o1.setOutside("c2");
            assertTrue(o1.getId() == "c");
            assertTrue(o1.getOutside() == "c2");
            Compartment o2 = o1.clone();

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