package org.jboss.soa.esb.quickstart.test;
import junit.framework.Test;
import org.jboss.soa.esb.samples.quickstart.businessrulesstateful.test.SendJMSMessage;
public class BusinessRulesServiceRuleAgentTest extends AbstractQuickstartTestCase {
public BusinessRulesServiceRuleAgentTest(String name) {
super(name);
}
public void testMessage() throws Exception {
clearMessages() ;
sendDeployMessage("SampleOrder1.xml");
//checkMessages(30000, "", "Success:" ) ;
clearMessages() ;
sendDeployMessage("SampleOrder2.xml");
//checkMessages(30000, "", "Success:" ) ;
clearMessages() ;
sendDeployMessage("SampleOrder3.xml");
//checkMessages(30000, "", "Success:" ) ;
}
public void sendDeployMessage(String fileName) throws Exception {
SendJMSMessage sdm = new SendJMSMessage();
sdm.setupConnection();
String sampleOrders = Helpers.getQuickstartLocation("business_ruleservice_stateful/" + fileName);
String fileContent = sdm.readAsciiFile(sampleOrders);
sdm.sendAMessage(fileContent);
sdm.stop();
}
public static Test suite() throws Exception {
return getDeploySetup(BusinessRulesServiceRuleAgentTest.class, "QuickstartMessageStoreServer.sar, Quickstart_business_ruleservice_ruleAgent.esb");
}
}