Package org.mule.common

Examples of org.mule.common.MuleArtifact


            builder = new SpringXmlConfigurationBuilder(new ConfigResource[] {config, defaultConfigOverride});
            muleContext = factory.createMuleContext(builder);
            muleContext.start();

            MuleArtifact artifact = null;
            if (embedInFlow)
            {
                Pipeline pipeline = muleContext.getRegistry().lookupObject(flowName);
                if (pipeline.getMessageSource() == null)
                {
View Full Code Here


        when(callback.getPropertyPlaceholders()).thenReturn(new Element[] {});
        when(callback.getSchemaLocation(VM_SCHEMA_URL)).thenReturn("http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd");
        Element element = createElement("inbound-endpoint", VM_SCHEMA_URL, "vm");
        element.setAttribute("path", "/test");

        MuleArtifact artifact = factory.getArtifactForMessageProcessor(element, callback);

        Assert.assertFalse(artifact.hasCapability(Testable.class));
    }
View Full Code Here

    private void checkUnsupportedConnector(String connectorConfig) throws IOException, SAXException, MuleArtifactFactoryException
    {
        Document document = XMLUnit.buildControlDocument(connectorConfig);

        MuleArtifact artifact = lookupArtifact().getArtifact(document.getDocumentElement(), getXmlConfigurationCallbackForUnsupportedConnector());

        Assert.assertNotNull(artifact);
        Assert.assertFalse(artifact.hasCapability(Testable.class));
        Assert.assertEquals(artifact.getCapability(Testable.class), null);
    }
View Full Code Here

{

    protected void doTestMessageProcessorArtifactRetrieval(Document document, XmlConfigurationCallback callback) throws MuleArtifactFactoryException
    {
        XmlConfigurationMuleArtifactFactory factory = lookupArtifact();
        MuleArtifact artifact = null;

        try
        {
            artifact = factory.getArtifactForMessageProcessor(document.getDocumentElement(), callback);
View Full Code Here

    private void doTestMessageProcessor(Document document, XmlConfigurationCallback callback, TestResult.Status expectedResult)
            throws MuleArtifactFactoryException
    {
        XmlConfigurationMuleArtifactFactory factory = lookupArtifact();
        MuleArtifact artifact = null;

        try
        {
            artifact = factory.getArtifactForMessageProcessor(document.getDocumentElement(), callback);

            assertNotNull(artifact);
            assertTrue(artifact.hasCapability(OperationMetaDataEnabled.class));
            assertTrue(artifact.getCapability(OperationMetaDataEnabled.class) instanceof OperationMetaDataEnabled);
            if (expectedResult != null)
            {
                OperationMetaDataEnabled artifactCapability = artifact.getCapability(OperationMetaDataEnabled.class);
                assertNull(artifactCapability.getInputMetaData());
                assertEquals(expectedResult, artifactCapability.getOutputMetaData(null).getStatus());
            }
        }
        finally
View Full Code Here

    private void doTest(Document document, XmlConfigurationCallback callback, TestResult.Status expectedResult)
            throws MuleArtifactFactoryException
    {
        XmlConfigurationMuleArtifactFactory factory = lookupArtifact();
        MuleArtifact artifact = null;

        try
        {
            artifact = factory.getArtifact(document.getDocumentElement(), callback);
            assertNotNull(artifact);
            assertTrue(artifact.hasCapability(Testable.class));
            assertTrue(artifact.getCapability(Testable.class) instanceof Testable);
            if (expectedResult != null)
            {
                Testable artifactCapability = artifact.getCapability(Testable.class);
                assertEquals(expectedResult, artifactCapability.test().getStatus());
            }
        }
        finally
        {
View Full Code Here

TOP

Related Classes of org.mule.common.MuleArtifact

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.