Examples of injectComponent()


Examples of org.auraframework.integration.Integration.injectComponent()

        Map<String, Object> attributes = Maps.newHashMap();
        attributes.put("stringArray", "I am not a list!");
        Appendable out = new StringBuffer();
        Integration integration = createIntegration();
        try {
            integration.injectComponent(arraysComponentTag, attributes, "", "", out);
            fail("Passing attribute with wrong type should have failed.");
        } catch (AuraRuntimeException expected) {
            // TODO rework after ccollab: Earlier error message was like
            // "Unknown attribute or event ui:button:fooBar"
            assertEquals("Whatever we gonna throw ....", expected.getMessage());
View Full Code Here

Examples of org.auraframework.integration.Integration.injectComponent()

        Appendable out = new StringBuffer();
        Integration integration = createIntegration();
        attributes.put("label", "Click Me");
        attributes.put("press", new Integer(10));
        try {
            integration.injectComponent(simpleComponentTag, attributes, "", "", out);
            fail("Should have failed to accept a non String value for event handler.");
        } catch (AuraRuntimeException expected) {
            // Expected
        } catch (Exception unexpected) {
            fail("Failed to detect bad value provided for event handlers. Failed :" + unexpected.getMessage());
View Full Code Here

Examples of org.auraframework.integration.Integration.injectComponent()

    public void testInjectingNonExistingComponent() throws Exception {
        Map<String, Object> attributes = Maps.newHashMap();
        Appendable out = new StringBuffer();
        Integration integration = createIntegration();
        try {
            integration.injectComponent("foo:bared", attributes, "", "", out);
            fail("Instantiating component through integration service should have failed because of missing component def.");
        } catch (DefinitionNotFoundException expected) {
            // Expected exception
            assertTrue(expected.getMessage().contains("No COMPONENT named markup://foo:bared found"));
        }
View Full Code Here

Examples of org.auraframework.integration.Integration.injectComponent()

        String validApp = "test:laxSecurity";
        Map<String, Object> attributes = Maps.newHashMap();
        Appendable out = new StringBuffer();
        Integration integration = createIntegration();
        try {
            integration.injectComponent(validApp, attributes, "", "", out);
            fail("Injecting an application through integration service should have failed.");
        } catch (DefinitionNotFoundException expected) {
            // TODO: Maybe a better error message?
            assertTrue(expected.getMessage().contains("No COMPONENT named markup://test:laxSecurity found"));
        }
View Full Code Here

Examples of org.auraframework.integration.Integration.injectComponent()

                String.format(baseComponentTag, "", "<aura:attribute name='reqAttr' required='true' type='String'/>"));
        Map<String, Object> attributes = Maps.newHashMap();
        Appendable out = new StringBuffer();
        Integration integration = createIntegration();
        try {
            integration.injectComponent(cmp.getDescriptorName(), attributes, "", "", out);
        } catch (Exception unexpected) {
            fail("Exceptions during component instantiation should be funneled to the client.");
        }
    }
View Full Code Here

Examples of org.auraframework.integration.Integration.injectComponent()

                ApplicationDef.class, appMarkup);
        Map<String, Object> attributes = Maps.newHashMap();
        Appendable out = new StringBuffer();
        Integration integration = service.createIntegration("", Mode.UTEST, true, null, appDesc.getQualifiedName(), null);
        try {
            integration.injectComponent(simpleComponentTag, attributes, "", "", out);
            fail("App used for integration should extend aura:integrationServiceApp");
        } catch (AuraRuntimeException expected) {
            assertEquals("Application must extend aura:integrationServiceApp.", expected.getMessage());
        }
    }
View Full Code Here

Examples of org.auraframework.integration.Integration.injectComponent()

        AuraContext ctx = contextService.getCurrentContext();
        contextService.endContext();

        Integration integration = Aura.getIntegrationService().createIntegration(
                "", Mode.DEV, true, null, applicationTag, null);
        integration.injectComponent(tag, attributes, localId, locatorDomId, out, useAsync);

        // The only not-so-ideal part of this approach to testing
        // IntegrationService is that we have to start the
        // context for the rendering of the original stub component to continue.
        // IntegrationService sets up and tears down its context.
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.