Examples of validateReferences()


Examples of org.auraframework.def.AttributeDef.validateReferences()

    public void testValidateReferencesDefaultValue() throws Exception {
        TypeDef typeDef = Mockito.mock(TypeDef.class);
        Mockito.doReturn(typeDef).when(this.typeDefDescriptor).getDef();
        AttributeDef attributeDef = buildDefinition();
        Mockito.verifyZeroInteractions(this.defaultValue);
        attributeDef.validateReferences();
        Mockito.verify(this.defaultValue).parseValue(typeDef);
        Mockito.verify(this.defaultValue).validateReferences();
    }

    public void testValidateReferencesReferenceThrowsClassNotFound() throws Exception {
View Full Code Here

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

        testDependencyDef = vendor.makeDependencyDef(vendor.makeComponentDefDescriptor("hi"),
                "markup://aura:iDontExist", "APPLICATION", vendor.makeLocation("f1", 5, 5, 0));
        deps.clear();
        testDependencyDef.appendDependencies(deps);
        try {
            testDependencyDef.validateReferences();
            fail("Exception not thrown when looking for dependency that does not exist");
        } catch (Exception e) {
            checkExceptionFull(e, InvalidDefinitionException.class,
                    "Invalid dependency markup://aura:iDontExist[APPLICATION]", "f1");
        }
View Full Code Here

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

        testDependencyDef = vendor.makeDependencyDef(vendor.makeComponentDefDescriptor("hi"),
                "markup://aura:application", "COMPONENT", vendor.makeLocation("f1", 5, 5, 0));
        deps.clear();
        testDependencyDef.appendDependencies(deps);
        try {
            testDependencyDef.validateReferences();
            fail("Exception not thrown when dependency resource is valid but is of wrong type");
        } catch (Exception e) {
            checkExceptionFull(e, InvalidDefinitionException.class,
                    "Invalid dependency markup://aura:application[COMPONENT]", "f1");
        }
View Full Code Here

Examples of org.auraframework.def.InterfaceDef.validateReferences()

        StringSource<?> source = (StringSource<?>) getSource(extendsSelf);
        source.addOrUpdate(String.format("<aura:interface extends='%s'> </aura:interface>",
                extendsSelf.getDescriptorName()));
        try {
            InterfaceDef def = extendsSelf.getDef();
            def.validateReferences();
            fail("An interface should not be able to extend itself.");
        } catch (InvalidDefinitionException expected) {
            assertEquals(extendsSelf.getQualifiedName() + " cannot extend itself", expected.getMessage());
        }
    }
View Full Code Here

Examples of org.auraframework.def.InterfaceDef.validateReferences()

        DefDescriptor<InterfaceDef> cmpDesc = addSourceAutoCleanup(InterfaceDef.class,
                "<aura:interface extends='aura:iDontExist'></aura:interface>");
        try {
            // Aura.getInstanceService().getInstance(cmpDesc.getDescriptorName(), ComponentDef.class);
            InterfaceDef def = cmpDesc.getDef();
            def.validateReferences();
            fail("Did not get expected exception: " + DefinitionNotFoundException.class.getName());
        } catch (Exception e) {
            checkExceptionFull(e, DefinitionNotFoundException.class,
                    "No INTERFACE named markup://aura:iDontExist found : [" + cmpDesc.getQualifiedName()+"]",
                    cmpDesc.getQualifiedName());
View Full Code Here

Examples of org.auraframework.def.ThemeDef.validateReferences()

            }
        }

        // vars
        for (VarDef def : vars.values()) {
            def.validateReferences();
        }

        // verify var cross references refer to something defined on this theme or on a parent theme. Or if this is a
        // cmp theme it can also refer to something on the namespace default theme.
        Iterable<String> names = getAllNames();
View Full Code Here

Examples of org.auraframework.def.ThemeDef.validateReferences()

        StringSource<?> source = (StringSource<?>) getAuraTestingUtil().getSource(extendsSelf);
        String contents = "<aura:theme extends='%s'> </aura:theme>";
        source.addOrUpdate(String.format(contents, extendsSelf.getDescriptorName()));
        try {
            ThemeDef def = extendsSelf.getDef();
            def.validateReferences();
            fail("A theme should not be able to extend itself.");
        } catch (Exception e) {
            checkExceptionContains(e, InvalidDefinitionException.class, "cannot extend itself");
        }
    }
View Full Code Here

Examples of org.auraframework.def.ThemeDefRef.validateReferences()

    }

    public void testInvalidReference() throws Exception {
        try {
            ThemeDefRef def = source("<aura:importTheme name='blah:blah'/>");
            def.validateReferences();
            fail("expected to get an exception");
        } catch (Exception e) {
            checkExceptionContains(e, DefinitionNotFoundException.class, "No THEME");
        }
    }
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.