Examples of FlowConstruct


Examples of org.mule.api.construct.FlowConstruct

    @Test
    public void testStartupOrder() throws Exception
    {
        MuleContext muleContext = new DefaultMuleContextFactory().createMuleContext(new QueueManagerOnlyConfigurationBuilder());
        FlowConstruct fc = new RecordingFlow("dummy", muleContext);
        muleContext.getRegistry().registerFlowConstruct(fc);
        muleContext.start();
        muleContext.stop();
        assertEquals(4, startStopOrder.size());
        assertSame(rtqm, startStopOrder.get(0));
View Full Code Here

Examples of org.mule.api.construct.FlowConstruct

        assertEquals("the-value:" + flowName, customStore.getCustomProperty());
    }

    private IdempotentMessageFilter idempotentMessageFilterFromFlow(final String flowName) throws Exception
    {
        final FlowConstruct flow = getFlowConstruct(flowName);
        assertTrue(flow instanceof Flow);

        final Flow simpleFlow = (Flow) flow;
        final List<MessageProcessor> processors = simpleFlow.getMessageProcessors();
        assertEquals(1, processors.size());
View Full Code Here

Examples of org.mule.api.construct.FlowConstruct

        assertNull(filter.getIdExpression());
    }

    private IdempotentRedeliveryPolicy redeliveryPolicyFromFlow(String flowName) throws Exception
    {
        FlowConstruct flow = getFlowConstruct(flowName);
        assertTrue(flow instanceof Flow);

        MessageSource source = ((Flow) flow).getMessageSource();
        assertTrue(source instanceof InboundEndpoint);
        AbstractRedeliveryPolicy redeliveryPolicy = ((InboundEndpoint)source).getRedeliveryPolicy();
View Full Code Here

Examples of org.mule.api.construct.FlowConstruct

    }

    @Test
    public void testGenericObjectFactory() throws Exception
    {
        FlowConstruct c = muleContext.getRegistry().lookupFlowConstruct("orange1");
       
        Object flow =  getComponent(c);
        assertTrue("Flow should be an Orange", flow instanceof Orange);
        // Default values
        assertEquals(new Integer(10), ((Orange) flow).getSegments());
View Full Code Here

Examples of org.mule.api.construct.FlowConstruct

    }
   
    @Test
    public void testGenericObjectFactoryWithProperties() throws Exception
    {
        FlowConstruct c = muleContext.getRegistry().lookupFlowConstruct("orange2");

        // Create an orange
        Object flow = getComponent(c);
        assertTrue("Flow should be an Orange", flow instanceof Orange);
        assertEquals(new Integer(8), ((Orange) flow).getSegments());
View Full Code Here

Examples of org.mule.api.construct.FlowConstruct

    }
   
    @Test
    public void testSingletonObjectFactory() throws Exception
    {
        FlowConstruct c = muleContext.getRegistry().lookupFlowConstruct("orange3");
       
        Object flow =  getComponent(c);
        assertTrue("Flow should be an Orange", flow instanceof Orange);
        // Default values
        assertEquals(new Integer(10), ((Orange) flow).getSegments());
View Full Code Here

Examples of org.mule.api.construct.FlowConstruct

    }
   
    @Test
    public void testSpringSingleton() throws Exception
    {
        FlowConstruct c = muleContext.getRegistry().lookupFlowConstruct("orange4");
       
        Object flow =  getComponent(c);
        assertTrue("Flow should be an Orange", flow instanceof Orange);
        // Default values
        assertEquals(new Integer(10), ((Orange) flow).getSegments());
View Full Code Here

Examples of org.mule.api.construct.FlowConstruct

    }
   
    @Test
    public void testSpringFactoryBean() throws Exception
    {
        FlowConstruct c = muleContext.getRegistry().lookupFlowConstruct("orange5");
       
        Object flow =  getComponent(c);
        assertNotNull(flow);
        assertTrue("Flow should be an Orange but is: " + flow.getClass(), flow instanceof Orange);
        assertEquals(new Integer(8), ((Orange) flow).getSegments());
View Full Code Here

Examples of org.mule.api.construct.FlowConstruct

    }

    @Test
    public void testPojoAsFactoryBean() throws Exception
    {
        FlowConstruct c = muleContext.getRegistry().lookupFlowConstruct("orange6");
       
        Object flow =  getComponent(c);
        assertNotNull(flow);
        assertTrue("Flow should be an Orange but is: " + flow.getClass(), flow instanceof Orange);
        assertEquals("Florida Sunny", ((Orange) flow).getBrand());
View Full Code Here

Examples of org.mule.api.construct.FlowConstruct

        MessageProcessor listener = mock(MessageProcessor.class,
            withSettings().extraInterfaces(Initialisable.class));
        ((Initialisable) listener).initialise();

        FlowConstruct flowConstruct = mock(FlowConstruct.class);

        HttpCallbackFactory callbackFactory = new DefaultHttpCallbackFactory();
        this.callback = (DefaultHttpCallback) callbackFactory.createCallback(adapter, "(.)",
            fetchMessageProcessor, listener, muleContext, flowConstruct);
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.