Package org.mule.construct

Examples of org.mule.construct.Flow


    }

    @Test
    public void returnsNullBulkUpdateInputMetadata() throws Exception
    {
        Flow flowConstruct = (Flow) muleContext.getRegistry().lookupFlowConstruct("bulkUpdateMetadata");

        List<MessageProcessor> messageProcessors = flowConstruct.getMessageProcessors();
        BulkExecuteMessageProcessor queryMessageProcessor = (BulkExecuteMessageProcessor) messageProcessors.get(0);
        Result<MetaData> inputMetaData = queryMessageProcessor.getInputMetaData();

        assertThat(inputMetaData, equalTo(null));
    }
View Full Code Here


    }

    @Test
    public void returnsNullStoredProcedureInputMetadata() throws Exception
    {
        Flow flowConstruct = (Flow) muleContext.getRegistry().lookupFlowConstruct("storedProcedureMetadata");

        List<MessageProcessor> messageProcessors = flowConstruct.getMessageProcessors();
        StoredProcedureMessageProcessor dbMessageProcessor = (StoredProcedureMessageProcessor) messageProcessors.get(0);
        Result<MetaData> inputMetaData = dbMessageProcessor.getInputMetaData();

        assertThat(inputMetaData, equalTo(null));
    }
View Full Code Here

        super(dataSourceConfigResource, testDatabase);
    }

    protected void doResolvedMetadataTest(String flowName)
    {
        Flow flowConstruct = (Flow) muleContext.getRegistry().lookupFlowConstruct(flowName);

        List<MessageProcessor> messageProcessors = flowConstruct.getMessageProcessors();
        AbstractDbMessageProcessor messageProcessor = (AbstractDbMessageProcessor) messageProcessors.get(0);
        Result<MetaData> inputMetaData = messageProcessor.getInputMetaData();

        DefaultListMetaDataModel listMetaDataModel = (DefaultListMetaDataModel) inputMetaData.get().getPayload();
        DefinedMapMetaDataModel mapDataModel = (DefinedMapMetaDataModel) listMetaDataModel.getElementModel();
View Full Code Here

    }

    @Test
    public void returnsUpdateCountsMetadata() throws Exception
    {
        Flow flowConstruct = (Flow) muleContext.getRegistry().lookupFlowConstruct("bulkUpdateMetadata");

        List<MessageProcessor> messageProcessors = flowConstruct.getMessageProcessors();
        BulkExecuteMessageProcessor bulkExecuteMessageProcessor = (BulkExecuteMessageProcessor) messageProcessors.get(0);
        Result<MetaData> outputMetaData = bulkExecuteMessageProcessor.getOutputMetaData(null);

        DefaultListMetaDataModel listMetaDataModel = (DefaultListMetaDataModel) outputMetaData.get().getPayload();
        SimpleMetaDataModel elementModel = (SimpleMetaDataModel) listMetaDataModel.getElementModel();
View Full Code Here

        doResolvedMetadataTest("selectMetadataMapParams");
    }

    private void doUnresolvedMetadataTest(String flowName)
    {
        Flow flowConstruct = (Flow) muleContext.getRegistry().lookupFlowConstruct(flowName);

        List<MessageProcessor> messageProcessors = flowConstruct.getMessageProcessors();
        AbstractSingleQueryDbMessageProcessor queryMessageProcessor = (AbstractSingleQueryDbMessageProcessor) messageProcessors.get(0);
        Result<MetaData> inputMetaData = queryMessageProcessor.getInputMetaData();

        assertThat(inputMetaData, equalTo(null));
    }
View Full Code Here

        assertThat(inputMetaData, equalTo(null));
    }

    private void doResolvedMetadataTest(String flowName)
    {
        Flow flowConstruct = (Flow) muleContext.getRegistry().lookupFlowConstruct(flowName);

        List<MessageProcessor> messageProcessors = flowConstruct.getMessageProcessors();
        AbstractSingleQueryDbMessageProcessor queryMessageProcessor = (AbstractSingleQueryDbMessageProcessor) messageProcessors.get(0);
        Result<MetaData> inputMetaData = queryMessageProcessor.getInputMetaData();

        DefinedMapMetaDataModel mapDataModel = (DefinedMapMetaDataModel) inputMetaData.get().getPayload();
        assertThat(mapDataModel.getKeys().size(), equalTo(2));
View Full Code Here

    }

    @Test
    public void returnsInsertOutputMetadata() throws Exception
    {
        Flow flowConstruct = (Flow) muleContext.getRegistry().lookupFlowConstruct("insertMetadata");

        List<MessageProcessor> messageProcessors = flowConstruct.getMessageProcessors();
        AbstractSingleQueryDbMessageProcessor queryMessageProcessor = (AbstractSingleQueryDbMessageProcessor) messageProcessors.get(0);
        Result<MetaData> outputMetaData = queryMessageProcessor.getOutputMetaData(null);

        SimpleMetaDataModel simpleMetaDataModel = (SimpleMetaDataModel) outputMetaData.get().getPayload();
        assertThat(simpleMetaDataModel.getDataType(), equalTo(DataType.DOUBLE));
View Full Code Here

    }

    @Test
    public void returnsInsertAutoGeneratedKeysOutputMetadata() throws Exception
    {
        Flow flowConstruct = (Flow) muleContext.getRegistry().lookupFlowConstruct("insertAutoGeneratedKeysMetadata");

        List<MessageProcessor> messageProcessors = flowConstruct.getMessageProcessors();
        AbstractSingleQueryDbMessageProcessor queryMessageProcessor = (AbstractSingleQueryDbMessageProcessor) messageProcessors.get(0);
        Result<MetaData> outputMetaData = queryMessageProcessor.getOutputMetaData(null);

        DefaultListMetaDataModel listMetaDataModel = (DefaultListMetaDataModel) outputMetaData.get().getPayload();
        assertEquals(ArrayList.class.getName(), listMetaDataModel.getImplementationClass());
View Full Code Here

    }

    @Test
    public void returnsUpdateBulkMetadata() throws Exception
    {
        Flow flowConstruct = (Flow) muleContext.getRegistry().lookupFlowConstruct("updateBulkMetadata");

        List<MessageProcessor> messageProcessors = flowConstruct.getMessageProcessors();
        PreparedBulkUpdateMessageProcessor queryMessageProcessor = (PreparedBulkUpdateMessageProcessor) messageProcessors.get(0);
        Result<MetaData> outputMetaData = queryMessageProcessor.getOutputMetaData(null);

        DefaultListMetaDataModel listMetaDataModel = (DefaultListMetaDataModel) outputMetaData.get().getPayload();
        assertThat(listMetaDataModel.isArray(), equalTo(true));
View Full Code Here

        doResolvedMetadataTest("insertMetadataMapParams");
    }

    private void doUnresolvedMetadataTest(String flowName)
    {
        Flow flowConstruct = (Flow) muleContext.getRegistry().lookupFlowConstruct(flowName);

        List<MessageProcessor> messageProcessors = flowConstruct.getMessageProcessors();
        AbstractSingleQueryDbMessageProcessor queryMessageProcessor = (AbstractSingleQueryDbMessageProcessor) messageProcessors.get(0);
        Result<MetaData> inputMetaData = queryMessageProcessor.getInputMetaData();

        assertThat(inputMetaData, equalTo(null));
    }
View Full Code Here

TOP

Related Classes of org.mule.construct.Flow

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.