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

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


public class MXMLLibraryNodeTests extends MXMLNodeBaseTests
  private IMXMLLibraryNode getMXMLLibraryNode(String[] code)
  {
    IMXMLFileNode fileNode = getMXMLFileNode(code);
    IMXMLLibraryNode node = (IMXMLLibraryNode)findFirstDescendantOfType(fileNode, IMXMLLibraryNode.class);
    assertThat("getNodeID", node.getNodeID(), is(ASTNodeID.MXMLLibraryID));
    assertThat("getName", node.getName(), is("Library"));
    return node;
  }
View Full Code Here


  {
    String[] code = new String[]
    {
      "<fx:Library/>"
    };
    IMXMLLibraryNode node = getMXMLLibraryNode(code);
    assertThat("getChildCount", node.getChildCount(), is(0));
    assertThat("getDefinitionNodes", node.getDefinitionNodes().length, is(0));
  }
View Full Code Here

    String[] code = new String[]
    {
        "<fx:Library>",
        "</fx:Library>"
    };
    IMXMLLibraryNode node = getMXMLLibraryNode(code);
    assertThat("getChildCount", node.getChildCount(), is(0));
    assertThat("getDefinitionNodes", node.getDefinitionNodes().length, is(0));
  }
View Full Code Here

        "    <fx:Definition name='MySprite1'>",
        "        <d:Sprite/>",
        "    </fx:Definition>",
        "</fx:Library>"
    };
    IMXMLLibraryNode node = getMXMLLibraryNode(code);
    assertThat("getChildCount", node.getChildCount(), is(1));
    assertThat("getDefinitionNodes", node.getDefinitionNodes().length, is(1));
    assertThat("getDefinitionNodes[0]", node.getDefinitionNodes()[0].getDefinitionName(), is("MySprite1"));
  }
View Full Code Here

        "    <fx:Definition name='MySprite2'>",
        "        <d:Sprite/>",
        "    </fx:Definition>",
        "</fx:Library>"
    };
    IMXMLLibraryNode node = getMXMLLibraryNode(code);
    assertThat("getChildCount", node.getChildCount(), is(2));
    assertThat("getDeclarationInstanceNodes", node.getDefinitionNodes().length, is(2));
    assertThat("getDefinitionNodes[0]", node.getDefinitionNodes()[0].getDefinitionName(), is("MySprite1"));
    assertThat("getDefinitionNodes[1]", node.getDefinitionNodes()[1].getDefinitionName(), is("MySprite2"));
  }
View Full Code Here

TOP

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

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.