1   
2   
3   
4   
5   
6   
7   
8   
9   
10  
11  
12  
13  
14  
15  
16  package org.kuali.rice.kim.test.service;
17  
18  import static org.junit.Assert.fail;
19  
20  import java.util.List;
21  
22  import javax.xml.namespace.QName;
23  
24  import org.kuali.rice.core.api.config.property.ConfigContext;
25  import org.kuali.rice.kim.api.KimApiConstants;
26  import org.kuali.rice.ksb.api.KsbApiServiceLocator;
27  import org.kuali.rice.ksb.api.bus.Endpoint;
28  import org.kuali.rice.ksb.api.bus.ServiceBus;
29  import org.kuali.rice.test.BaselineTestCase;
30  
31  
32  
33  
34  
35  
36  
37  @BaselineTestCase.BaselineMode(BaselineTestCase.Mode.ROLLBACK_CLEAR_DB)
38  public class GroupServiceRemoteTest extends GroupServiceTest {
39  
40  	@Override
41      public void setUp() throws Exception {
42  		super.setUp();
43  	}
44  
45  	private String getConfigProp(String propKey) {
46  		return ConfigContext.getCurrentContextConfig().getProperty(propKey);
47  	}
48  
49  	
50  
51  
52  
53  
54  
55  
56  	protected Object getKimService(String svcName) throws Exception {
57  		ServiceBus serviceBus = KsbApiServiceLocator.getServiceBus();
58  		List<Endpoint> endpoints = serviceBus.getRemoteEndpoints(new QName(KimApiConstants.Namespaces.KIM_NAMESPACE_2_0, svcName));
59  		if (endpoints.size() > 1) {
60  			fail("Found more than one RemotedServiceHolder for " + svcName);
61  		}
62  		Endpoint endpoint = endpoints.get(0);
63  		return endpoint.getService();
64  	}
65  }