Package org.apache.flex.compiler.tree.mxml

Examples of org.apache.flex.compiler.tree.mxml.IMXMLBindingNode


public class MXMLBindingNodeTests extends MXMLNodeBaseTests
{
  private IMXMLBindingNode getMXMLBindingNode(String[] code)
  {
    IMXMLFileNode fileNode = getMXMLFileNode(code);
    IMXMLBindingNode node = (IMXMLBindingNode)findFirstDescendantOfType(fileNode, IMXMLBindingNode.class);
    assertThat("getNodeID", node.getNodeID(), is(ASTNodeID.MXMLBindingID));
    assertThat("getName", node.getName(), is("Binding"));
    return node;
  }
View Full Code Here


  {
    String[] code = new String[]
    {
      "<fx:Binding/>"
    };
    IMXMLBindingNode node = getMXMLBindingNode(code);
    assertThat("getChildCount", node.getChildCount(), is(0));
    assertThat("getSourceAttributeNode", node.getSourceAttributeNode(), is((IMXMLBindingAttributeNode)null));
    assertThat("getDestinationAttributeNode", node.getDestinationAttributeNode(), is((IMXMLBindingAttributeNode)null));
    assertThat("getTwoWay", node.getTwoWay(), is(false));
  }
View Full Code Here

  {
    String[] code = new String[]
    {
      "<fx:Binding></fx:Binding>"
    };
    IMXMLBindingNode node = getMXMLBindingNode(code);
    assertThat("getChildCount", node.getChildCount(), is(0));
    assertThat("getSourceAttributeNode", node.getSourceAttributeNode(), is((IMXMLBindingAttributeNode)null));
    assertThat("getDestinationAttributeNode", node.getDestinationAttributeNode(), is((IMXMLBindingAttributeNode)null));
    assertThat("getTwoWay", node.getTwoWay(), is(false));
  }
View Full Code Here

  {
    String[] code = new String[]
    {
      "<fx:Binding> \t\r\n</fx:Binding>"
    };
    IMXMLBindingNode node = getMXMLBindingNode(code);
    assertThat("getChildCount", node.getChildCount(), is(0));
    assertThat("getSourceAttributeNode", node.getSourceAttributeNode(), is((IMXMLBindingAttributeNode)null));
    assertThat("getDestinationAttributeNode", node.getDestinationAttributeNode(), is((IMXMLBindingAttributeNode)null));
    assertThat("getTwoWay", node.getTwoWay(), is(false));
  }
View Full Code Here

  {
    String[] code = new String[]
    {
      "<fx:Binding source=' a.b '/>"
    };
    IMXMLBindingNode node = getMXMLBindingNode(code);
    assertThat("getChildCount", node.getChildCount(), is(1));
    assertThat("getSourceAttributeNode", node.getSourceAttributeNode(), is((IMXMLBindingAttributeNode)node.getChild(0)));
    assertThat("getSourceAttributeNode.getExpressionNode.getNodeID", node.getSourceAttributeNode().getExpressionNode().getNodeID(), is(ASTNodeID.MemberAccessExpressionID));
    assertThat("getDestinationAttributeNode", node.getDestinationAttributeNode(), is((IMXMLBindingAttributeNode)null));
    assertThat("getTwoWay", node.getTwoWay(), is(false));
  }
View Full Code Here

  {
    String[] code = new String[]
    {
      "<fx:Binding destination=' c.d '/>"
    };
    IMXMLBindingNode node = getMXMLBindingNode(code);
    assertThat("getChildCount", node.getChildCount(), is(1));
    assertThat("getSourceAttributeNode", node.getSourceAttributeNode(), is((IMXMLBindingAttributeNode)null));
    assertThat("getDestinationAttributeNode", node.getDestinationAttributeNode(), is((IMXMLBindingAttributeNode)node.getChild(0)));
    assertThat("getDestinationAttributeNode.getExpressionNode.getNodeID", node.getDestinationAttributeNode().getExpressionNode().getNodeID(), is(ASTNodeID.MemberAccessExpressionID));
    assertThat("getTwoWay", node.getTwoWay(), is(false));
  }
View Full Code Here

  {
    String[] code = new String[]
    {
      "<fx:Binding twoWay=' false '/>"
    };
    IMXMLBindingNode node = getMXMLBindingNode(code);
    assertThat("getChildCount", node.getChildCount(), is(0));
    assertThat("getSourceAttributeNode", node.getSourceAttributeNode(), is((IMXMLBindingAttributeNode)null));
    assertThat("getDestinationAttributeNode", node.getSourceAttributeNode(), is((IMXMLBindingAttributeNode)null));
    assertThat("getTwoWay", node.getTwoWay(), is(false));
  }
View Full Code Here

  {
    String[] code = new String[]
    {
      "<fx:Binding twoWay=' true '/>"
    };
    IMXMLBindingNode node = getMXMLBindingNode(code);
    assertThat("getChildCount", node.getChildCount(), is(0));
    assertThat("getSourceAttributeNode", node.getSourceAttributeNode(), is((IMXMLBindingAttributeNode)null));
    assertThat("getDestinationAttributeNode", node.getSourceAttributeNode(), is((IMXMLBindingAttributeNode)null));
    assertThat("getTwoWay", node.getTwoWay(), is(true));
  }
View Full Code Here

  {
    String[] code = new String[]
    {
      "<fx:Binding source=' a.b ' destination=' c.d ' twoWay=' true '/>"
    };
    IMXMLBindingNode node = getMXMLBindingNode(code);
    assertThat("getChildCount", node.getChildCount(), is(2));
    assertThat("getSourceAttributeNode", node.getSourceAttributeNode(), is((IMXMLBindingAttributeNode)node.getChild(0)));
    assertThat("getSourceAttributeNode.getExpressionNode.getNodeID", node.getSourceAttributeNode().getExpressionNode().getNodeID(), is(ASTNodeID.MemberAccessExpressionID));
    assertThat("getDestinationAttributeNode", node.getDestinationAttributeNode(), is((IMXMLBindingAttributeNode)node.getChild(1)));
    assertThat("getDestinationAttributeNode.getExpressionNode.getNodeID", node.getDestinationAttributeNode().getExpressionNode().getNodeID(), is(ASTNodeID.MemberAccessExpressionID));
    assertThat("getTwoWay", node.getTwoWay(), is(true));
  }
View Full Code Here

  {
    String[] code = new String[]
    {
      "<fx:Binding destination=' c.d ' twoWay=' false ' source=' a.b '/>"
    };
    IMXMLBindingNode node = getMXMLBindingNode(code);
    assertThat("getChildCount", node.getChildCount(), is(2));
    assertThat("getSourceAttributeNode", node.getSourceAttributeNode(), is((IMXMLBindingAttributeNode)node.getChild(1)));
    assertThat("getSourceAttributeNode.getExpressionNode.getNodeID", node.getSourceAttributeNode().getExpressionNode().getNodeID(), is(ASTNodeID.MemberAccessExpressionID));
    assertThat("getDestinationAttributeNode", node.getDestinationAttributeNode(), is((IMXMLBindingAttributeNode)node.getChild(0)));
    assertThat("getDestinationAttributeNode.getExpressionNode.getNodeID", node.getDestinationAttributeNode().getExpressionNode().getNodeID(), is(ASTNodeID.MemberAccessExpressionID));
    assertThat("getTwoWay", node.getTwoWay(), is(false));
  }
View Full Code Here

TOP

Related Classes of org.apache.flex.compiler.tree.mxml.IMXMLBindingNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.