View Javadoc

1   /**
2    * Copyright 2005-2013 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
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.rice.ksb;
17  
18  import javax.xml.namespace.QName;
19  
20  import org.junit.Test;
21  import org.kuali.rice.ksb.api.KsbApiServiceLocator;
22  import org.kuali.rice.ksb.messaging.MessagingTestObject;
23  import org.kuali.rice.ksb.messaging.service.KSBJavaService;
24  import org.kuali.rice.ksb.test.KSBTestCase;
25  
26  //@Ignore
27  public class StartBusTest extends KSBTestCase {
28  
29  	@Override
30  	public boolean startClient1() {
31  		return true;
32  	}
33  
34  	@Test
35  	public void testStartTheBus() {
36  		QName serviceName = new QName("TestCl1", "testJavaAsyncService");
37  		
38  		KsbApiServiceLocator.getServiceBus().synchronize();
39  		
40  		KSBJavaService testJavaAsyncService = (KSBJavaService) KsbApiServiceLocator.getMessageHelper().getServiceAsynchronously(serviceName);
41  		testJavaAsyncService.invoke(new MessagingTestObject("message content"));
42  		
43  		// verifyServiceCalls(serviceName);
44  	}
45  
46  	// @Test public void testStartClient1() throws Exception {
47  	// new TestClient1().start();
48  	// }
49  	//	
50  	// @Test public void testStartClient2() throws Exception {
51  	// new TestClient1().start();
52  	// new TestClient2().start();
53  	// }
54  	//	
55  }