public void test_CompartmentType_parent_create()
        {
            Model           m  = new Model(2, 4);
            CompartmentType ct = m.createCompartmentType();
            ListOf          lo = m.getListOfCompartmentTypes();

            assertTrue(lo == m.getCompartmentType(0).getParentSBMLObject());
            assertTrue(lo == ct.getParentSBMLObject());
            assertTrue(m == lo.getParentSBMLObject());
        }
Esempio n. 2
0
        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_CompartmentType_parent_NULL()
        {
            SBMLDocument    d  = new SBMLDocument(2, 4);
            Model           m  = d.createModel();
            CompartmentType c  = m.createCompartmentType();
            CompartmentType c1 = c.clone();

            d = null;
            assertTrue(c1.getAncestorOfType(libsbml.SBML_MODEL) == null);
            assertTrue(c1.getParentSBMLObject() == null);
            assertEquals(c1.getSBMLDocument(), null);
            c1 = null;
        }
Esempio n. 4
0
        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;
        }