01: package org.objectweb.celtix.systest.routing.bridge;
02:
03: import java.util.HashMap;
04: import java.util.Map;
05:
06: import junit.framework.Test;
07: import junit.framework.TestSuite;
08:
09: import org.objectweb.celtix.systest.common.ClientServerSetupBase;
10: import org.objectweb.celtix.systest.common.ClientServerTestBase;
11: import org.objectweb.celtix.systest.jms.EmbeddedJMSBrokerLauncher;
12:
13: public class NormalRouterTest extends ClientServerTestBase {
14: public static Test suite() throws Exception {
15: TestSuite suite = new TestSuite();
16: //Oneways tests are not enabled due to bug 305054
17: suite.addTestSuite(TestSOAPHTTPToXMLHTTPRouter.class);
18: suite.addTestSuite(TestSOAPJMSToXMLHTTPRouter.class);
19: suite.addTestSuite(TestSOAPHTTPToXMLJMSRouter.class);
20: suite.addTestSuite(TestXMLHTTPToSOAPJMSRouter.class);
21: suite.addTestSuite(TestXMLJMSToSOAPHTTPRouter.class);
22: return new ClientServerSetupBase(suite) {
23: public void startServers() throws Exception {
24: Map<String, String> props = new HashMap<String, String>();
25: if (System.getProperty("activemq.store.dir") != null) {
26: props.put("activemq.store.dir", System
27: .getProperty("activemq.store.dir"));
28: }
29: props.put("java.util.logging.config.file", System
30: .getProperty("java.util.logging.config.file"));
31:
32: assertTrue("JMS Broker did not launch correctly",
33: launchServer(EmbeddedJMSBrokerLauncher.class,
34: props, null));
35: assertTrue("Remote server did not launch correctly",
36: launchServer(Server.class, false));
37:
38: assertTrue("Router did not launch correctly",
39: launchServer(NormalRouter.class, null,
40: new String[] { "-BUSid",
41: "celtix-switch" }));
42: }
43: };
44: }
45:
46: public static void main(String[] args) {
47: junit.textui.TestRunner.run(NormalRouterTest.class);
48: }
49:
50: }
|