Package org.auraframework.util.javascript.directive

Examples of org.auraframework.util.javascript.directive.Directive


     * Test basic initialization.
     */
    public void testIfDirectiveBasicInitialization() throws Exception {
        IfDirectiveType directiveTypeObj = new IfDirectiveType();
        assertTrue("If Directive type should be labled as 'if'", directiveTypeObj.getLabel().equals("if"));
        Directive directiveObj = directiveTypeObj.constructDirective(4, "");
        assertTrue("If directive is a multiline directive", directiveObj.isMultiline());
        String content = "Write anything you want and this will just throw is back. But it should throw back the exact same thing";
        directiveObj.setContent(content);
        // Regardless of the javascriptGenerator mode, an IF directive just
        // spits out its contents. Hence using null as
        // the mode.
        assertTrue("If directive should just spit out whatever was given to it", directiveObj.generateOutput(null)
                .equals(content));
    }
View Full Code Here


     */
    public void testIncludeDirectiveBasicInitialization() throws Exception {
        IncludeDirectiveType directiveTypeObj = new IncludeDirectiveType();
        assertTrue("Include Directive type should be labled as 'include'", directiveTypeObj.getLabel()
                .equals("include"));
        Directive directiveObj = directiveTypeObj.constructDirective(4, "");
        assertFalse("Include directive is a multiline directive", directiveObj.isMultiline());
    }
View Full Code Here

     * Test basic initialization.
     */
    public void testDebuggerDirectiveTypeBasicInitialization() {
        DebuggerDirectiveType d = new DebuggerDirectiveType();
        assertEquals("debugger", d.getLabel());
        Directive directiveObj = d.constructDirective(4, "");
        assertFalse("Debugger directive should be a multiline directive.", directiveObj.isMultiline());
    }
View Full Code Here

TOP

Related Classes of org.auraframework.util.javascript.directive.Directive

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.