Package org.auraframework.impl.root

Examples of org.auraframework.impl.root.AttributeDefImpl$Builder


        AttributeDefImpl ad = getElement("<aura:attribute name='mixed' type='String' serializeTo='nONe'/>");
        assertEquals(SerializeToType.NONE, ad.getSerializeTo());
    }

    public void testSerializeToPadded() throws Exception {
        AttributeDefImpl ad = getElement("<aura:attribute name='mixed' type='String' serializeTo=' server '/>");
        assertEquals(SerializeToType.SERVER, ad.getSerializeTo());
    }
View Full Code Here


        AttributeDefImpl ad = getElement("<aura:attribute name='mixed' type='String' serializeTo=' server '/>");
        assertEquals(SerializeToType.SERVER, ad.getSerializeTo());
    }

    public void testSerializeToDefault() throws Exception {
        AttributeDefImpl ad = getElement("<aura:attribute name='lower' type='String'/>");
        assertEquals(SerializeToType.BOTH, ad.getSerializeTo());
    }
View Full Code Here

        AttributeDefImpl ad = getElement("<aura:attribute name='lower' type='String'/>");
        assertEquals(SerializeToType.BOTH, ad.getSerializeTo());
    }

    public void testSerializeToInvalid() throws Exception {
        AttributeDefImpl ad = getElement("<aura:attribute name='invalid' type='String' serializeTo='client'/>");
        assertEquals(SerializeToType.INVALID, ad.getSerializeTo());
    }
View Full Code Here

        AttributeDefImpl ad = getElement("<aura:attribute name='invalid' type='String' serializeTo='client'/>");
        assertEquals(SerializeToType.INVALID, ad.getSerializeTo());
    }

    public void testSerializeToEmptyString() throws Exception {
        AttributeDefImpl ad = getElement("<aura:attribute name='invalid' type='String' serializeTo=''/>");
        assertEquals(SerializeToType.INVALID, ad.getSerializeTo());
    }
View Full Code Here

        AttributeDefImpl ad = getElement("<aura:attribute name='invalid' type='String' serializeTo=''/>");
        assertEquals(SerializeToType.INVALID, ad.getSerializeTo());
    }

    public void testTypeInvalidJavaType() throws Exception {
        AttributeDefImpl ad = getElement("<aura:attribute name='type' type='java://invalid'/>");
        try {
            ad.getTypeDef();
            fail("Expected Exception to be thrown when attribute is a non-existent java type");
        } catch (Throwable t) {
            assertExceptionMessage(t, DefinitionNotFoundException.class, "No TYPE named java://invalid found");
        }
    }
View Full Code Here

            assertExceptionMessage(t, DefinitionNotFoundException.class, "No TYPE named java://invalid found");
        }
    }

    public void testTypeInvalidAuraType() throws Exception {
        AttributeDefImpl ad = getElement("<aura:attribute name='type' type='aura://invalid'/>");
        try {
            ad.getTypeDef();
            fail("Expected Exception to be thrown when attribute is a non-existent Aura type");
        } catch (Throwable t) {
            assertExceptionMessage(t, DefinitionNotFoundException.class, "No TYPE named aura://invalid found");
        }
    }
View Full Code Here

            assertExceptionMessage(t, AuraRuntimeException.class, "QualifiedName is required for descriptors");
        }
    }

    public void testVisibility() throws Exception {
        AttributeDefImpl ad = getElement("<aura:attribute name='vis' type='String'/>");
        assertEquals(Visibility.PUBLIC, ad.getVisibility());
    }
View Full Code Here

        AttributeDefImpl ad = getElement("<aura:attribute name='vis' type='String'/>");
        assertEquals(Visibility.PUBLIC, ad.getVisibility());
    }

    public void testVisibilityMixedCase() throws Exception {
        AttributeDefImpl ad = getElement("<aura:attribute name='vis' type='String' visibility='PrivatE'/>");
        assertEquals(Visibility.PRIVATE, ad.getVisibility());
    }
View Full Code Here

        AttributeDefImpl ad = getElement("<aura:attribute name='vis' type='String' visibility='PrivatE'/>");
        assertEquals(Visibility.PRIVATE, ad.getVisibility());
    }

    public void testVisibilityPadded() throws Exception {
        AttributeDefImpl ad = getElement("<aura:attribute name='vis' type='String' visibility=' private '/>");
        assertEquals(Visibility.PRIVATE, ad.getVisibility());
    }
View Full Code Here

        AttributeDefImpl ad = getElement("<aura:attribute name='vis' type='String' visibility=' private '/>");
        assertEquals(Visibility.PRIVATE, ad.getVisibility());
    }

    public void testVisibilityInvalid() throws Exception {
        AttributeDefImpl ad = getElement("<aura:attribute name='vis' type='String' visibility='invisible'/>");
        assertEquals(Visibility.INVALID, ad.getVisibility());
    }
View Full Code Here

TOP

Related Classes of org.auraframework.impl.root.AttributeDefImpl$Builder

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.