isSetName() public method

public isSetName ( ) : bool
return bool
 public void test_Parameter_setName2()
 {
     Parameter p = new  Parameter(2,2);
       int i = p.setName( "1cell");
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertEquals( true, p.isSetName() );
       i = p.unsetName();
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertEquals( false, p.isSetName() );
       p = null;
 }
 public void test_Parameter_setName3()
 {
     Parameter p = new  Parameter(1,2);
       int i = p.setName( "11pp");
       assertTrue( i == libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE );
       assertEquals( false, p.isSetName() );
       i = p.setName("");
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertEquals( false, p.isSetName() );
       p = null;
 }
Ejemplo n.º 3
0
 public void test_L3_Parameter_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(3,1);
       sbmlns.addNamespaces(xmlns);
       Parameter p = new  Parameter(sbmlns);
       assertTrue( p.getTypeCode() == libsbml.SBML_PARAMETER );
       assertTrue( p.getMetaId() == "" );
       assertTrue( p.getNotes() == null );
       assertTrue( p.getAnnotation() == null );
       assertTrue( p.getLevel() == 3 );
       assertTrue( p.getVersion() == 1 );
       assertTrue( p.getNamespaces() != null );
       assertTrue( p.getNamespaces().getLength() == 2 );
       assertTrue( p.getId() == "" );
       assertTrue( p.getName() == "" );
       assertTrue( p.getUnits() == "" );
       assertEquals( true, isnan(p.getValue()) );
       assertTrue( p.getConstant() == true );
       assertEquals( false, p.isSetId() );
       assertEquals( false, p.isSetName() );
       assertEquals( false, p.isSetValue() );
       assertEquals( false, p.isSetUnits() );
       assertEquals( false, p.isSetConstant() );
       p = null;
 }