1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.kuali.rice.test; |
17 |
|
|
18 |
|
import javax.sql.DataSource; |
19 |
|
import javax.transaction.UserTransaction; |
20 |
|
|
21 |
|
import org.kuali.rice.core.api.resourceloader.GlobalResourceLoader; |
22 |
|
import org.kuali.rice.core.impl.resourceloader.SpringResourceLoader; |
23 |
|
import org.springframework.context.ConfigurableApplicationContext; |
24 |
|
import org.springframework.transaction.jta.JtaTransactionManager; |
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
@link |
30 |
|
|
31 |
|
@link@link |
32 |
|
@link |
33 |
|
|
34 |
|
@author |
35 |
|
|
36 |
|
|
|
|
| 0% |
Uncovered Elements: 12 (12) |
Complexity: 6 |
Complexity Density: 1 |
|
37 |
|
public class TestHarnessServiceLocator { |
38 |
|
|
39 |
|
private static ConfigurableApplicationContext context; |
40 |
|
|
41 |
|
public static final String USER_TRANSACTION = "userTransaction"; |
42 |
|
public static final String TRANSACTON_MANAGER = "transactionManager"; |
43 |
|
public static final String DATA_SOURCE = "dataSource"; |
44 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
45 |
0
|
public static Object getService(String serviceName) {... |
46 |
0
|
return getContext().getBean(serviceName); |
47 |
|
} |
48 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
49 |
0
|
public static DataSource getDataSource() {... |
50 |
0
|
return (DataSource)getService(DATA_SOURCE); |
51 |
|
} |
52 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
53 |
0
|
public static JtaTransactionManager getJtaTransactionManager() {... |
54 |
0
|
return (JtaTransactionManager)getService(TRANSACTON_MANAGER); |
55 |
|
} |
56 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
57 |
0
|
public static UserTransaction getUserTransaction() {... |
58 |
0
|
return (UserTransaction)getService(USER_TRANSACTION); |
59 |
|
} |
60 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
61 |
0
|
public static ConfigurableApplicationContext getContext() {... |
62 |
0
|
return context; |
63 |
|
} |
64 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
65 |
0
|
public static void setContext(ConfigurableApplicationContext context) {... |
66 |
0
|
TestHarnessServiceLocator.context = context; |
67 |
|
} |
68 |
|
} |