<Function>
An {@link IMXMLFunctionNode} has no child nodes.
38394041424344454647
public class MXMLFunctionNodeTests extends MXMLExpressionNodeBaseTests { private IMXMLFunctionNode getMXMLFunctionNode(String[] code) { IMXMLFileNode fileNode = getMXMLFileNode(code); IMXMLFunctionNode node = (IMXMLFunctionNode)findFirstDescendantOfType(fileNode, IMXMLFunctionNode.class); assertThat("getNodeID", node.getNodeID(), is(ASTNodeID.MXMLFunctionID)); assertThat("getName", node.getName(), is("Function")); return node; }
515253545556575859
{ String[] code = new String[] { "<fx:Function/>" }; IMXMLFunctionNode node = getMXMLFunctionNode(code); assertThat("getValue", node.getValue(project), is((IFunctionDefinition)null)); assertThat("getExpressionNode", node.getExpressionNode(), is((IASNode)null)); }
636465666768697071
{ String[] code = new String[] { "<fx:Function></fx:Function>" }; IMXMLFunctionNode node = getMXMLFunctionNode(code); assertThat("getValue", node.getValue(project), is((IFunctionDefinition)null)); assertThat("getExpressionNode", node.getExpressionNode(), is((IASNode)null)); }
757677787980818283
{ String[] code = new String[] { "<fx:Function> \t\r\n</fx:Function>" }; IMXMLFunctionNode node = getMXMLFunctionNode(code); assertThat("getValue", node.getValue(project), is((IFunctionDefinition)null)); assertThat("getExpressionNode", node.getExpressionNode(), is((IASNode)null)); }
878889909192939495
{ String[] code = new String[] { "<fx:Function>trace</fx:Function>" }; IMXMLFunctionNode node = getMXMLFunctionNode(code); assertThat("getValue", node.getValue(project).getQualifiedName(), is("trace")); testExpressionLocation(node, 13, 18); }
100101102103104105106107108
{ String[] code = new String[] { "<fx:Function>flash.utils.getQualifiedClassName</fx:Function>" }; IMXMLFunctionNode node = getMXMLFunctionNode(code); assertThat("getValue", node.getValue(project).getQualifiedName(), is("flash.utils.getQualifiedClassName")); testExpressionLocation(node, 13, 41); }
113114115116117118119120121122123
{ String[] code = new String[] { "<fx:Function>{a.b}</fx:Function>" }; IMXMLFunctionNode node = getMXMLFunctionNode(code); assertThat("databinding node", node.getExpressionNode().getNodeID(), is(ASTNodeID.MXMLDataBindingID)); testExpressionLocation(node, 13, 18); assertThat("databinding node child count", node.getExpressionNode().getChildCount(), is(1)); assertThat("identifier node", node.getExpressionNode().getChild(0).getNodeID(), is(ASTNodeID.MemberAccessExpressionID)); }