getId() public method

public getId ( ) : string
return string
 public void test_UnitDefinition_createWithName()
 {
     UnitDefinition ud = new  UnitDefinition(2,4);
       ud.setName( "mmol_per_liter_per_sec");
       assertTrue( ud.getTypeCode() == libsbml.SBML_UNIT_DEFINITION );
       assertTrue( ud.getMetaId() == "" );
       assertTrue( ud.getNotes() == null );
       assertTrue( ud.getAnnotation() == null );
       assertTrue( ud.getId() == "" );
       assertTrue((  "mmol_per_liter_per_sec" == ud.getName() ));
       assertEquals( true, ud.isSetName() );
       assertTrue( ud.getNumUnits() == 0 );
       ud = null;
 }
 public void test_UnitDefinition_copyConstructor()
 {
     UnitDefinition o1 = new UnitDefinition(2,4);
       o1.setId("c");
       assertTrue( o1.getId() ==  "c" );
       UnitDefinition o2 = new UnitDefinition(o1);
       assertTrue( o2.getId() ==  "c" );
       assertTrue( o2.getParentSBMLObject() == o1.getParentSBMLObject() );
       o2 = null;
       o1 = null;
 }
Example #3
0
 public void test_Model_getUnitDefinition()
 {
     UnitDefinition ud1 = new  UnitDefinition(2,4);
       UnitDefinition ud2 = new  UnitDefinition(2,4);
       ud1.setId( "mmls"   );
       ud2.setId( "volume" );
       ud1.createUnit();
       ud2.createUnit();
       M.addUnitDefinition(ud1);
       M.addUnitDefinition(ud2);
       assertTrue( M.getNumUnitDefinitions() == 2 );
       ud1 = M.getUnitDefinition(0);
       ud2 = M.getUnitDefinition(1);
       assertTrue((  "mmls"    == ud1.getId() ));
       assertTrue((  "volume"  == ud2.getId() ));
 }
 public void test_UnitDefinition_assignmentOperator()
 {
     UnitDefinition o1 = new UnitDefinition(2,4);
       o1.setId("c");
       assertTrue( o1.getId() ==  "c" );
       UnitDefinition o2 = new UnitDefinition(2,4);
       o2 = o1;
       assertTrue( o2.getId() ==  "c" );
       assertTrue( o2.getParentSBMLObject() == o1.getParentSBMLObject() );
       o2 = null;
       o1 = null;
 }