Package org.auraframework.def

Examples of org.auraframework.def.DependencyDef.validateDefinition()


        DependencyDef testDependencyDef = null;

        // Invalid, no parent.
        try {
            testDependencyDef = vendor.makeDependencyDef(null, "aura", null, vendor.makeLocation("f1", 5, 5, 0));
            testDependencyDef.validateDefinition();
            fail("Should have thrown QuickFixException for null parent in DependencyDef's");
        } catch (Exception e) {
            checkExceptionFull(e, InvalidDefinitionException.class, "No parent in DependencyDef", "f1");
        }
View Full Code Here


        // Invalid no resource.
        try {
            testDependencyDef = vendor.makeDependencyDef(vendor.makeComponentDefDescriptor("hi"), null, "COMPONENT",
                    vendor.makeLocation("f1", 5, 5, 0));
            testDependencyDef.validateDefinition();
            fail("Should have thrown QuickFixException for null resource in DependencyDef's");
        } catch (Exception e) {
            checkExceptionFull(e, InvalidDefinitionException.class, "Missing required resource", "f1");
        }
View Full Code Here

        // Invalid type
        try {
            testDependencyDef = vendor.makeDependencyDef(vendor.makeComponentDefDescriptor("hi"), "aura", "WhatAmI",
                    vendor.makeLocation("f1", 5, 5, 0));
            testDependencyDef.validateDefinition();
            fail("Should have thrown QuickFixException for invalid type in DependencyDef's");
        } catch (Exception e) {
            checkExceptionRegex(e, InvalidDefinitionException.class,
                    "No enum const(ant)? (class )?org\\.auraframework\\.def\\.DefDescriptor.DefType\\.WhatAmI", "f1");
        }
View Full Code Here

        }

        // Valid, with a namespace.
        testDependencyDef = vendor.makeDependencyDef(vendor.makeComponentDefDescriptor("hi"), "aura", null,
                vendor.makeLocation("f1", 5, 5, 0));
        testDependencyDef.validateDefinition();

        // Valid, with a namespace & type.
        testDependencyDef = vendor.makeDependencyDef(vendor.makeComponentDefDescriptor("hi"), "aura", "COMPONENT",
                vendor.makeLocation("f1", 5, 5, 0));
        testDependencyDef.validateDefinition();
View Full Code Here

        testDependencyDef.validateDefinition();

        // Valid, with a namespace & type.
        testDependencyDef = vendor.makeDependencyDef(vendor.makeComponentDefDescriptor("hi"), "aura", "COMPONENT",
                vendor.makeLocation("f1", 5, 5, 0));
        testDependencyDef.validateDefinition();
    }

    /**
     * Verify that dependencies of different types can be found within a given namespace or that the correct Exception
     * is thrown.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.