Package

Source Code of ExpenseReportCallbackWithDLQTestCase

import com.prancingdonkey.domain.Brew;
import com.prancingdonkey.domain.Order;
import org.junit.Test;
import org.mule.api.MuleMessage;
import org.mule.tck.junit4.FunctionalTestCase;

import static junit.framework.Assert.assertNotNull;


public class ExpenseReportCallbackWithDLQTestCase extends FunctionalTestCase {

    @Override
    protected String getConfigResources() {
        return "./src/main/app/expenseReportsCallbackWithDLQ.xml";
    }

    @Test
    public void testCanRouteOrders() throws Exception {
        muleContext.getClient().dispatch("vm://orders",new Order(),null);
        MuleMessage response = muleContext.getClient().request("jms://brews.orders", 15000);
        assertNotNull(response);
    }

    @Test
    public void testCanRouteBrews() throws Exception {
        muleContext.getClient().dispatch("vm://orders",new Brew(),null);
        MuleMessage response = muleContext.getClient().request("jms://brews.definitions", 15000);
        assertNotNull(response);
    }

    @Test
    public void testCanRouteToDLQ() throws Exception {
        muleContext.getClient().dispatch("vm://orders","Foo.",null);
        MuleMessage response = muleContext.getClient().request("jms://DLQ", 15000);
        assertNotNull(response);
    }
}
TOP

Related Classes of ExpenseReportCallbackWithDLQTestCase

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.