Examples of XmlConfigurationCallback


Examples of org.mule.common.config.XmlConfigurationCallback

    @Test(expected = MuleArtifactFactoryException.class)
    public void detectsMissingAttribute() throws SAXException, IOException, MuleArtifactFactoryException
    {
        Document document = XMLUnit.buildControlDocument("<db:select xmlns:db=\"http://www.mulesoft.org/schema/mule/db\"><db:template-query-ref name=\"template\"/></db:select>");
        XmlConfigurationCallback callback = new DatabaseConfigurationCallback();

        lookupArtifact().getArtifactForMessageProcessor(document.getDocumentElement(), callback);
    }
View Full Code Here

Examples of org.mule.common.config.XmlConfigurationCallback

    @Test(expected = MuleArtifactFactoryException.class)
    public void detectsMissingDependentElement() throws SAXException, IOException, MuleArtifactFactoryException
    {
        Document document = XMLUnit.buildControlDocument("<db:select config-ref=\"mysql-config\" xmlns:db=\"http://www.mulesoft.org/schema/mule/db\"><db:template-query-ref name=\"template\"/></db:select>");
        XmlConfigurationCallback callback = new DatabaseConfigurationCallback();

        lookupArtifact().getArtifactForMessageProcessor(document.getDocumentElement(), callback);
    }
View Full Code Here

Examples of org.mule.common.config.XmlConfigurationCallback

        Map<String, String> callbackData = new HashMap<String, String>();
        callbackData.put("mysql-config", configRef);
        callbackData.put("template", templateRef);

        XmlConfigurationCallback callback = new DatabaseConfigurationCallback(callbackData);
        doTestMessageProcessorCapabilities(document, callback);
    }
View Full Code Here

Examples of org.mule.common.config.XmlConfigurationCallback

        Map<String, String> callbackData = new HashMap<String, String>();
        callbackData.put("mysql-config", configRef);
        callbackData.put("template1", templateRef1);

        XmlConfigurationCallback callback = new DatabaseConfigurationCallback(callbackData);
        doTestMessageProcessorCapabilities(document, callback);
    }
View Full Code Here

Examples of org.mule.common.config.XmlConfigurationCallback

        Map<String, String> callbackData = new HashMap<String, String>();
        callbackData.put("mysql-config", configRef);
        callbackData.put("template1", templateRef1);
        callbackData.put("template2", templateRef2);

        XmlConfigurationCallback callback = new DatabaseConfigurationCallback(callbackData);
        doTestMessageProcessorCapabilities(document, callback);
    }
View Full Code Here

Examples of org.mule.common.config.XmlConfigurationCallback

        Map<String, String> callbackData = new HashMap<String, String>();
        callbackData.put("derby-config", configRef);
        callbackData.put("template", templateRef);

        XmlConfigurationCallback callback = new DatabaseConfigurationCallback(callbackData);
        doTestMessageProcessor(document, callback);
    }
View Full Code Here

Examples of org.mule.common.config.XmlConfigurationCallback

        Assert.assertEquals(artifact.getCapability(Testable.class), null);
    }

    private XmlConfigurationCallback getXmlConfigurationCallbackForUnsupportedConnector()
    {
        return new XmlConfigurationCallback()
        {
            @Override
            public Element getGlobalElement(String s)
            {
                return null;
View Full Code Here

Examples of org.mule.common.config.XmlConfigurationCallback

    @Test(expected = MuleArtifactFactoryException.class)
    public void detectsMissingAttribute() throws SAXException, IOException, MuleArtifactFactoryException
    {
        Document document = XMLUnit.buildControlDocument("<jdbc:connector name=\"jdbcConnector\" pollingFrequency=\"1000\" queryTimeout=\"3000\" xmlns:jdbc=\"http://www.mulesoft.org/schema/mule/jdbc\"/>");
        XmlConfigurationCallback callback = new DatabaseConfigurationCallback();

        lookupArtifact().getArtifact(document.getDocumentElement(), callback);
    }
View Full Code Here

Examples of org.mule.common.config.XmlConfigurationCallback

    @Test(expected = MuleArtifactFactoryException.class)
    public void detectsMissingDependentElement() throws SAXException, IOException, MuleArtifactFactoryException
    {
        Document document = XMLUnit.buildControlDocument("<jdbc:connector name=\"jdbcConnector\" pollingFrequency=\"1000\" dataSource-ref=\"unknownJdbcDataSource\" queryTimeout=\"3000\" xmlns:jdbc=\"http://www.mulesoft.org/schema/mule/jdbc\"/>");
        XmlConfigurationCallback callback = new DatabaseConfigurationCallback();

        lookupArtifact().getArtifact(document.getDocumentElement(), callback);
    }
View Full Code Here

Examples of org.mule.common.config.XmlConfigurationCallback

            String refDef =
                    "<spring:bean xmlns:spring=\"http://www.springframework.org/schema/beans\" class=\"org.apache.commons.dbcp.BasicDataSource\" destroy-method=\"close\" id=\"jdbcDataSource\" name=\"Bean\">"
                    + "<spring:property name=\"driverClassName\" value=\"org.apache.derby.jdbc.EmbeddedDriver\"/>"
                    + "<spring:property name=\"url\" value=\"jdbc:derby:muleEmbeddedDB;create=true\"/>"
                    + "</spring:bean>";
            XmlConfigurationCallback callback = new DatabaseConfigurationCallback(Collections.singletonMap("jdbcDataSource", refDef));

            doTest(document, callback);
        }
        finally
        {
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.