01: /*
02: * Copyright 2007 The Kuali Foundation
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.kuali.bus;
17:
18: import javax.xml.namespace.QName;
19:
20: import org.junit.Test;
21: import org.kuali.bus.services.KSBServiceLocator;
22: import org.kuali.bus.test.KSBTestCase;
23:
24: import edu.iu.uis.eden.messaging.KEWJavaService;
25: import edu.iu.uis.eden.messaging.MessagingTestObject;
26: import edu.iu.uis.eden.messaging.resourceloading.KSBResourceLoaderFactory;
27:
28: public class StartBusTest extends KSBTestCase {
29:
30: @Override
31: public boolean startClient1() {
32: return true;
33: }
34:
35: @Test
36: public void testStartTheBus() {
37: QName serviceName = new QName("TestCl1", "testJavaAsyncService");
38:
39: ((Runnable) KSBResourceLoaderFactory.getRemoteResourceLocator())
40: .run();
41:
42: KEWJavaService testJavaAsyncService = (KEWJavaService) KSBServiceLocator
43: .getMessageHelper().getServiceAsynchronously(
44: serviceName);
45: testJavaAsyncService.invoke(new MessagingTestObject(
46: "message content"));
47:
48: // verifyServiceCalls(serviceName);
49: }
50:
51: // @Test public void testStartClient1() throws Exception {
52: // new TestClient1().start();
53: // }
54: //
55: // @Test public void testStartClient2() throws Exception {
56: // new TestClient1().start();
57: // new TestClient2().start();
58: // }
59: //
60: }
|