1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.observation.remote.test; |
21 |
|
|
22 |
|
import org.junit.Before; |
23 |
|
import org.junit.Rule; |
24 |
|
import org.xwiki.component.embed.EmbeddableComponentManager; |
25 |
|
import org.xwiki.observation.ObservationManager; |
26 |
|
import org.xwiki.test.internal.MockConfigurationSource; |
27 |
|
import org.xwiki.test.jmock.JMockRule; |
28 |
|
import org.xwiki.test.jmock.XWikiComponentInitializer; |
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
@version |
34 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (21) |
Complexity: 7 |
Complexity Density: 0.5 |
|
35 |
|
public abstract class AbstractROMTestCase |
36 |
|
{ |
37 |
|
@Rule |
38 |
|
public final JMockRule mockery = new JMockRule(); |
39 |
|
|
40 |
|
private XWikiComponentInitializer initializer1 = new XWikiComponentInitializer(); |
41 |
|
|
42 |
|
private XWikiComponentInitializer initializer2 = new XWikiComponentInitializer(); |
43 |
|
|
44 |
|
private ObservationManager observationManager1; |
45 |
|
|
46 |
|
private ObservationManager observationManager2; |
47 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
|
48 |
1 |
@Before... |
49 |
|
public void setUp() throws Exception |
50 |
|
{ |
51 |
1 |
this.initializer1.initializeConfigurationSource(); |
52 |
1 |
this.initializer1.initializeExecution(); |
53 |
|
|
54 |
1 |
this.initializer2.initializeConfigurationSource(); |
55 |
1 |
this.initializer2.initializeExecution(); |
56 |
|
|
57 |
1 |
getConfigurationSource1().setProperty("observation.remote.enabled", Boolean.TRUE); |
58 |
1 |
getConfigurationSource2().setProperty("observation.remote.enabled", Boolean.TRUE); |
59 |
|
|
60 |
1 |
this.observationManager1 = getComponentManager1().getInstance(ObservationManager.class); |
61 |
1 |
this.observationManager2 = getComponentManager2().getInstance(ObservationManager.class); |
62 |
|
} |
63 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
64 |
1 |
public EmbeddableComponentManager getComponentManager1() throws Exception... |
65 |
|
{ |
66 |
1 |
return this.initializer1.getComponentManager(); |
67 |
|
} |
68 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
69 |
2 |
public EmbeddableComponentManager getComponentManager2() throws Exception... |
70 |
|
{ |
71 |
2 |
return this.initializer2.getComponentManager(); |
72 |
|
} |
73 |
|
|
74 |
|
|
75 |
|
@return |
76 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
77 |
2 |
public MockConfigurationSource getConfigurationSource1()... |
78 |
|
{ |
79 |
2 |
return this.initializer1.getConfigurationSource(); |
80 |
|
} |
81 |
|
|
82 |
|
|
83 |
|
@return |
84 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
85 |
1 |
public MockConfigurationSource getConfigurationSource2()... |
86 |
|
{ |
87 |
1 |
return this.initializer2.getConfigurationSource(); |
88 |
|
} |
89 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
90 |
4 |
public ObservationManager getObservationManager1()... |
91 |
|
{ |
92 |
4 |
return this.observationManager1; |
93 |
|
} |
94 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
95 |
1 |
public ObservationManager getObservationManager2()... |
96 |
|
{ |
97 |
1 |
return this.observationManager2; |
98 |
|
} |
99 |
|
} |