Package com.muleinaction.lifecycle

Source Code of com.muleinaction.lifecycle.LifecycleTrackerTransformerTestCase

package com.muleinaction.lifecycle;

import static org.junit.Assert.assertEquals;

import org.junit.Test;
import org.mule.api.MuleContext;
import org.mule.api.MuleMessage;
import org.mule.module.client.MuleClient;

public class LifecycleTrackerTransformerTestCase
{
    @Test
    public void trackLifecycle() throws Exception
    {
        final MuleClient muleClient = new MuleClient("lifecycle-config.xml");

        final MuleContext muleContext = muleClient.getMuleContext();
        muleContext.start();

        final MuleMessage result = muleClient.send("vm://EchoFlow.In", "foo", null);

        final LifecycleTrackerTransformer ltt = (LifecycleTrackerTransformer) result.getPayload();

        muleContext.dispose();
        muleClient.dispose();

        assertEquals("[setProperty, setMuleContext, setMuleContext, setFlowConstruct, initialise, start, stop]",
            ltt.getTracker().toString());
    }
}
TOP

Related Classes of com.muleinaction.lifecycle.LifecycleTrackerTransformerTestCase

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.