Package org.auraframework.impl.root.event

Examples of org.auraframework.impl.root.event.EventDefImpl$Builder


    public void testParseEvent() throws Exception {
        XMLParser parser = XMLParser.getInstance();
        DefDescriptor<EventDef> eventDescriptor = DefDescriptorImpl.getInstance("test:anevent", EventDef.class);
        Source<?> source = getSource(eventDescriptor);
        EventDefImpl eventDef = (EventDefImpl) parser.parse(eventDescriptor, source);
        assertNotNull(eventDef);
        assertEquals("Unexpected Descriptor", eventDescriptor, eventDef.getDescriptor());
        assertEquals("Wrong event type", EventType.COMPONENT, eventDef.getEventType());
        Map<DefDescriptor<AttributeDef>, AttributeDef> atts = eventDef.getDeclaredAttributeDefs();
        assertEquals("Wrong number of attributes", 3, atts.size());
    }
View Full Code Here


        Map<DefDescriptor<AttributeDef>, AttributeDef> atts = new HashMap<>();
        DefDescriptor<TypeDef> type = DefDescriptorImpl.getInstance("String", TypeDef.class);
        atts.put(DefDescriptorImpl.getInstance("testString", AttributeDef.class), new AttributeDefImpl(
                DefDescriptorImpl.getInstance("testString", AttributeDef.class), null, type, null, true,
                AttributeDef.SerializeToType.BOTH, null, null));
        EventDefImpl eventDef = vendor.makeEventDef(eventDesc, EventType.COMPONENT, atts, null, null);

        context.getDefRegistry().addLocalDef(eventDef);
        String res = Json.serialize(context, context.getJsonSerializationContext());
        assertTrue(res.contains("markup://fake:event"));
    }
View Full Code Here

TOP

Related Classes of org.auraframework.impl.root.event.EventDefImpl$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.