Package org.auraframework.def

Examples of org.auraframework.def.Definition


    public void testGetDefinition_DefDescriptor_assertAccess() throws QuickFixException {
        Aura.getContextService().startContext(Mode.PROD, Format.HTML, Authentication.AUTHENTICATED);
        DefDescriptor<ComponentDef> desc = Aura.getDefinitionService().getDefDescriptor(
                DEFINITION_SERVICE_IMPL_TEST_TARGET_COMPONENT, ComponentDef.class);
        try {
            Definition def = definitionService.getDefinition(desc);
            definitionService.getDefRegistry().assertAccess(null, def);
            fail("Expected NoAccessException from assertAccess");
        } catch (NoAccessException e) {
        }
    }
View Full Code Here


    public void testGetDefinition_StringClass_assertAccess() throws QuickFixException {
        Aura.getContextService().startContext(Mode.PROD, Format.HTML, Authentication.AUTHENTICATED);
        DefDescriptor<ComponentDef> desc = Aura.getDefinitionService().getDefDescriptor(
                DEFINITION_SERVICE_IMPL_TEST_TARGET_COMPONENT, ComponentDef.class);
        try {
            Definition def = Aura.getDefinitionService().getDefinition(desc.getQualifiedName(), ComponentDef.class);
            definitionService.getDefRegistry().assertAccess(null, def);
            fail("Expected NoAccessException from assertAccess");
        } catch (NoAccessException e) {
        }
    }
View Full Code Here

    public void testGetDefinition_StringDefType_assertAccess() throws QuickFixException {
        Aura.getContextService().startContext(Mode.PROD, Format.HTML, Authentication.AUTHENTICATED);
        DefDescriptor<ComponentDef> desc = Aura.getDefinitionService().getDefDescriptor(
                DEFINITION_SERVICE_IMPL_TEST_TARGET_COMPONENT, ComponentDef.class);
        try {
            Definition def = Aura.getDefinitionService().getDefinition(desc.getQualifiedName(), DefType.COMPONENT);
            definitionService.getDefRegistry().assertAccess(null, def);
            fail("Expected NoAccessException from assertAccess");
        } catch (NoAccessException e) {
        }
    }
View Full Code Here

        // number overflow (W-1564567)
        // assertParseException("987654321987654321987654321", "int", ParseException.class, "Unparseable number: ");
    }

    public void testValidateReferencesChainsToValue() throws Exception {
        Definition value = Mockito.mock(Definition.class);
        AttributeDefRefImpl adr = vendor.makeAttributeDefRef(testAttributeDescriptorName, value, null);
        Mockito.verify(value, Mockito.times(0)).validateReferences();
        adr.validateReferences();
        Mockito.verify(value, Mockito.times(1)).validateReferences();
    }
View Full Code Here

        adr.validateReferences();
        Mockito.verify(value, Mockito.times(1)).validateReferences();
    }

    public void testValidateReferencesChainsThroughCollection() throws Exception {
        Definition value = Mockito.mock(Definition.class);
        AttributeDefRefImpl adr = vendor
                .makeAttributeDefRef(testAttributeDescriptorName, ImmutableList.of(value), null);
        Mockito.verify(value, Mockito.times(0)).validateReferences();
        adr.validateReferences();
        Mockito.verify(value, Mockito.times(1)).validateReferences();
View Full Code Here

        adr.validateReferences();
        Mockito.verify(value, Mockito.times(1)).validateReferences();
    }

    public void testAppendDependenciesChainsToValue() throws Exception {
        Definition value = Mockito.mock(Definition.class);
        AttributeDefRefImpl adr = vendor.makeAttributeDefRef(testAttributeDescriptorName, value, null);
        Mockito.verify(value, Mockito.times(0)).appendDependencies(Mockito.<Set<DefDescriptor<?>>> any());
        Set<DefDescriptor<?>> dependencies = Sets.newHashSet();
        adr.appendDependencies(dependencies);
        Mockito.verify(value, Mockito.times(1)).appendDependencies(Mockito.<Set<DefDescriptor<?>>> any());
View Full Code Here

        adr.appendDependencies(dependencies);
        Mockito.verify(value, Mockito.times(1)).appendDependencies(Mockito.<Set<DefDescriptor<?>>> any());
    }

    public void testAppendDependenciesChainsThroughCollection() throws Exception {
        Definition value = Mockito.mock(Definition.class);
        AttributeDefRefImpl adr = vendor.makeAttributeDefRef(testAttributeDescriptorName, Sets.newHashSet(value), null);
        Mockito.verify(value, Mockito.times(0)).appendDependencies(Mockito.<Set<DefDescriptor<?>>> any());
        Set<DefDescriptor<?>> dependencies = Sets.newHashSet();
        adr.appendDependencies(dependencies);
        Mockito.verify(value, Mockito.times(1)).appendDependencies(Mockito.<Set<DefDescriptor<?>>> any());
View Full Code Here

TOP

Related Classes of org.auraframework.def.Definition

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.