public void test_ASTNode_units()
{
int i;
ASTNode n = new ASTNode();
n.setType(libsbml.AST_REAL);
n.setValue(1.6);
i = n.setUnits( "mole");
assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
assertTrue( n.isSetUnits() == true );
assertTrue(( "mole" == n.getUnits() ));
i = n.unsetUnits();
assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
assertTrue( n.isSetUnits() == false );
assertTrue(( "" == n.getUnits() ));
i = n.setUnits( "1mole");
assertTrue( i == libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE );
assertTrue( n.isSetUnits() == false );
n.setType(libsbml.AST_FUNCTION);
i = n.setUnits( "mole");
assertTrue( i == libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE );
assertTrue( n.isSetUnits() == false );
assertTrue(( "" == n.getUnits() ));
n = null;
}