public void test_Unit_copyConstructor() { Unit o1 = new Unit(2,4); o1.setKind(libsbml.UNIT_KIND_MOLE); assertTrue( o1.getKind() == libsbml.UNIT_KIND_MOLE ); Unit o2 = new Unit(o1); assertTrue( o2.getKind() == libsbml.UNIT_KIND_MOLE ); assertTrue( o2.getParentSBMLObject() == o1.getParentSBMLObject() ); o2 = null; o1 = null; }
public void test_Unit_assignmentOperator() { Unit o1 = new Unit(2,4); o1.setKind(libsbml.UNIT_KIND_MOLE); assertTrue( o1.getKind() == libsbml.UNIT_KIND_MOLE ); Unit o2 = new Unit(2,4); o2 = o1; assertTrue( o2.getKind() == libsbml.UNIT_KIND_MOLE ); assertTrue( o2.getParentSBMLObject() == o1.getParentSBMLObject() ); o2 = null; o1 = null; }