Package

Source Code of ExpenseReportsCallbackWithDLQFunctionalTestCase

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

import java.util.HashMap;
import java.util.Map;


public class ExpenseReportsCallbackWithDLQFunctionalTestCase extends FunctionalTestCase {

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

    @Test
    @SuppressWarnings({"unchecked"})
    public void testCannotSubmitNonBrew() throws Exception {
        MuleClient client = muleContext.getClient();
        client.dispatch("vm://orders", "Foo", null);
        MuleMessage result = client.request("jms://DLQ", 5000);
        Assert.assertNotNull(result);
    }

    @Test
    @SuppressWarnings({"unchecked"})
    public void testCannotSubmitOrder() throws Exception {
        MuleClient client = muleContext.getClient();
        client.dispatch("vm://orders", new Order(), null);
        MuleMessage result = client.request("jms://brews.orders", 5000);
        Assert.assertNotNull(result);
    }
}
TOP

Related Classes of ExpenseReportsCallbackWithDLQFunctionalTestCase

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.